1
0
mirror of https://github.com/Sonarr/Sonarr synced 2025-10-05 23:52:45 +02:00

Subtitles indexer flag to indicate BTN releases with subtitles

This commit is contained in:
oxfordllama
2025-09-01 21:58:19 +00:00
committed by GitHub
parent e757dca038
commit d6f265c7b5
5 changed files with 19 additions and 2 deletions

View File

@@ -27,6 +27,7 @@
"TvrageID":"4055",
"ImdbID":"0320037",
"InfoHash":"123",
"Tags": ["Subtitles"],
"DownloadURL":"https:\/\/broadcasthe.net\/torrents.php?action=download&id=123&authkey=123&torrent_pass=123"
},
"1234":{
@@ -54,8 +55,9 @@
"TvrageID":"38472",
"ImdbID":"2377081",
"InfoHash":"1234",
"Tags": [],
"DownloadURL":"https:\/\/broadcasthe.net\/torrents.php?action=download&id=1234&authkey=1234&torrent_pass=1234"
}},
"results":"117927"
}
}
}

View File

@@ -64,6 +64,8 @@ namespace NzbDrone.Core.Test.IndexerTests.BroadcastheNetTests
torrentInfo.Container.Should().Be("MP4");
torrentInfo.Codec.Should().Be("x264");
torrentInfo.Resolution.Should().Be("SD");
torrentInfo.IndexerFlags.Should().HaveFlag(IndexerFlags.Subtitles);
}
private void VerifyBackOff()

View File

@@ -121,6 +121,11 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
break;
}
if (item.Tags?.Contains("Subtitles") == true)
{
flags |= IndexerFlags.Subtitles;
}
return flags;
}

View File

@@ -1,3 +1,5 @@
using System.Collections.Generic;
namespace NzbDrone.Core.Indexers.BroadcastheNet
{
public class BroadcastheNetTorrent
@@ -26,6 +28,7 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
public int? TvrageID { get; set; }
public string ImdbID { get; set; }
public string InfoHash { get; set; }
public List<string> Tags { get; set; }
public string DownloadURL { get; set; }
}
}

View File

@@ -43,6 +43,11 @@ namespace NzbDrone.Core.Parser.Model
/// <summary>
/// The release is nuked
/// </summary>
Nuked = 128
Nuked = 128,
/// <summary>
/// The release contains subtitles
/// </summary>
Subtitles = 256
}
}