Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions app/Notification/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,14 @@ public function sendIrcNotification(): void {

public function ircNotification(): string {
$torrent = $this->torrent;
$tgroup = $torrent->group();
$tgroup = $torrent->group();
$releaseTags = [$torrent->media(), $torrent->format(), $torrent->encoding()];
/**
* For CD media it publishes whether there is a Cue, Log, and Score. This can be used by tools like autobrr
*/
if (strcmp($torrent->media(), "CD") == 0) {
array_push($releaseTags, $torrent->hasCue() ? "Cue": "", $torrent->hasLog() ? "Log" : "", $torrent->logScore());
}
return match ($tgroup->categoryName()) {
'Music' => Irc::render(
IrcText::Bold,
Expand All @@ -313,7 +320,7 @@ public function ircNotification(): string {
'[',
$torrent->isRemasteredUnknown() || !$torrent->isRemastered() ? $tgroup->year() : $torrent->remasterYear(),
"] [{$tgroup->releaseTypeName()}] ",
implode('/', [$torrent->media(), $torrent->format(), $torrent->encoding()]),
$torrent->implode('/', $releaseTags),
IrcText::ColorOff,
' – ',
IrcText::SurfieGreen,
Expand Down