feat(arr): add opensubtitles.com subtitle provider
Searches by moviehash computed from the media file and by TMDB id with season/episode for TV, ranks candidates through arr_core::subs::rank, and downloads under a lazily-fetched user token. The daily download cap (429/406) surfaces as Error::RateLimited so the loop can show a queue state. Credentials come from config or environment only; tests run against wiremock fixtures.
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"total_count": "3",
|
||||
"data": [
|
||||
{
|
||||
"id": "7013923",
|
||||
"type": "subtitle",
|
||||
"attributes": {
|
||||
"subtitle_id": "7013923",
|
||||
"language": "pt-PT",
|
||||
"release": "Dune.Part.Two.2024.1080p.WEB-DL.DDP5.1.Atmos.H.264-GRP",
|
||||
"moviehash_match": true,
|
||||
"ratings": 82.0,
|
||||
"download_count": 12345,
|
||||
"hearing_impaired": false,
|
||||
"foreign_parts_only": false,
|
||||
"format": "srt",
|
||||
"uploader": { "name": "someone", "rating": 90 },
|
||||
"files": [
|
||||
{ "file_id": 60619911, "file_name": "Dune.Part.Two.2024.1080p.WEB-DL-GRP.pt.srt", "cd_number": 1 }
|
||||
],
|
||||
"feature_details": { "year": 2024, "title": "Dune: Part Two", "tmdb_id": 693134 }
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "7000001",
|
||||
"type": "subtitle",
|
||||
"attributes": {
|
||||
"subtitle_id": "7000001",
|
||||
"language": "pt-BR",
|
||||
"release": "Dune.Part.Two.2024.2160p.BluRay.GRP",
|
||||
"moviehash_match": false,
|
||||
"ratings": 95.0,
|
||||
"download_count": 999999,
|
||||
"hearing_impaired": false,
|
||||
"foreign_parts_only": false,
|
||||
"format": "srt",
|
||||
"uploader": { "name": "other", "rating": 100 },
|
||||
"files": [
|
||||
{ "file_id": 60000001, "file_name": "dune.part.two.br.srt", "cd_number": 1 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "6999999",
|
||||
"type": "subtitle",
|
||||
"attributes": {
|
||||
"subtitle_id": "6999999",
|
||||
"language": "en",
|
||||
"release": "Dune.Part.Two.2024.1080p.WEB-DL.GRP",
|
||||
"moviehash_match": true,
|
||||
"ratings": 40.0,
|
||||
"download_count": 5,
|
||||
"hearing_impaired": true,
|
||||
"foreign_parts_only": false,
|
||||
"format": "srt",
|
||||
"files": [
|
||||
{ "file_id": 59999991, "file_name": "dune.en.sdh.srt", "cd_number": 1 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "6888888",
|
||||
"type": "subtitle",
|
||||
"attributes": {
|
||||
"subtitle_id": "6888888",
|
||||
"language": "fr",
|
||||
"release": "Dune.Part.Two.2024.1080p.WEB-DL.GRP",
|
||||
"moviehash_match": false,
|
||||
"ratings": null,
|
||||
"download_count": 12,
|
||||
"hearing_impaired": false,
|
||||
"foreign_parts_only": true,
|
||||
"format": "srt",
|
||||
"files": [
|
||||
{ "file_id": 58888881, "file_name": "dune.fr.forced.srt", "cd_number": 1 }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user