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
12 changes: 4 additions & 8 deletions Tubifarry/Indexers/Soulseek/SlskdItemsParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public AlbumData CreateAlbumData(string searchId, IGrouping<string, SlskdFileDat
ExplicitContent = ExtractExplicitTag(folderData.Path),
Priotity = priority,
CustomString = JsonConvert.SerializeObject(filesToDownload),
ExtraInfo = [edition, $"👤 {folderData.Username} ", $"{(folderData.HasFreeUploadSlot ? "⚡" : "❌")} {folderData.UploadSpeed / 1024.0 / 1024.0:F2}MB/s ", folderData.QueueLength == 0 ? "" : $"📋 {folderData.QueueLength}"],
ExtraInfo = [qualityInfo, edition, $"👤 {folderData.Username} ", $"{(folderData.HasFreeUploadSlot ? "⚡" : "❌")} {folderData.UploadSpeed / 1024.0 / 1024.0:F2}MB/s ", folderData.QueueLength == 0 ? "" : $"📋 {folderData.QueueLength}"],
Duration = TotalDuration
};
}
Expand Down Expand Up @@ -498,13 +498,9 @@ private static string DetermineFinalAlbum(bool isAlbumMatch, SlskdFolderData fol

private static string FormatQualityInfo(AudioFormat codec, int? bitRate, int? bitDepth, int? sampleRate)
{
if (codec == AudioFormat.MP3 && bitRate.HasValue)
return $"{codec} {bitRate}kbps";

if (bitDepth.HasValue && sampleRate.HasValue)
return $"{codec} {bitDepth}bit/{sampleRate / 1000}kHz";

return codec.ToString();
return $"{sampleRate / 1000}kHz";
return null;
}

[GeneratedRegex(@"(?ix)
Expand Down Expand Up @@ -562,4 +558,4 @@ private static string FormatQualityInfo(AudioFormat codec, int? bitRate, int? bi
[GeneratedRegex(@"[._/]+", RegexOptions.Compiled)]
private static partial Regex NormalizeCharactersRegex();
}
}
}