mirror of
https://github.com/Sonarr/Sonarr
synced 2025-12-30 12:13:21 +01:00
Subtitles indexer flag to indicate BTN releases with subtitles
This commit is contained in:
parent
e757dca038
commit
d6f265c7b5
5 changed files with 19 additions and 2 deletions
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ public async Task should_parse_recent_feed_from_BroadcastheNet()
|
|||
torrentInfo.Container.Should().Be("MP4");
|
||||
torrentInfo.Codec.Should().Be("x264");
|
||||
torrentInfo.Resolution.Should().Be("SD");
|
||||
|
||||
torrentInfo.IndexerFlags.Should().HaveFlag(IndexerFlags.Subtitles);
|
||||
}
|
||||
|
||||
private void VerifyBackOff()
|
||||
|
|
|
|||
|
|
@ -121,6 +121,11 @@ private static IndexerFlags GetIndexerFlags(BroadcastheNetTorrent item)
|
|||
break;
|
||||
}
|
||||
|
||||
if (item.Tags?.Contains("Subtitles") == true)
|
||||
{
|
||||
flags |= IndexerFlags.Subtitles;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace NzbDrone.Core.Indexers.BroadcastheNet
|
||||
{
|
||||
public class BroadcastheNetTorrent
|
||||
|
|
@ -26,6 +28,7 @@ public class BroadcastheNetTorrent
|
|||
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; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ public enum IndexerFlags
|
|||
/// <summary>
|
||||
/// The release is nuked
|
||||
/// </summary>
|
||||
Nuked = 128
|
||||
Nuked = 128,
|
||||
|
||||
/// <summary>
|
||||
/// The release contains subtitles
|
||||
/// </summary>
|
||||
Subtitles = 256
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue