test: cover shortened Radarr filenames
This commit is contained in:
parent
c62a18beff
commit
188164c3e5
1 changed files with 25 additions and 0 deletions
|
|
@ -238,6 +238,31 @@ class RadarrImportSafetyTests(unittest.TestCase):
|
|||
self.assertEqual(imported["releaseGroup"], "MAMA")
|
||||
self.assertEqual(imported["indexerFlags"], 4)
|
||||
|
||||
def test_release_folder_matches_when_movie_filename_is_shortened(self):
|
||||
release = "Example.Movie.2026.German.DL.1080p.WEB.H264-GROUP"
|
||||
exact = f"/tdarr/converted/video/{release}/movie-final.mkv"
|
||||
result = run_script(
|
||||
{
|
||||
"releaseTitle": "movie-final",
|
||||
"exactPath": exact,
|
||||
"scopeRoot": "/tdarr/converted/video/",
|
||||
"queueResponse": {"records": [{"title": release, "movieId": 7331}]},
|
||||
"historyResponse": {"records": []},
|
||||
"parseResponse": {},
|
||||
"candidates": [
|
||||
{
|
||||
"path": exact,
|
||||
"quality": {"quality": {"id": 3, "name": "WEBDL-1080p"}},
|
||||
"languages": [{"id": 4, "name": "German"}],
|
||||
}
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
self.assertEqual(result["result"], 1)
|
||||
command = next(call for call in result["calls"] if call["type"] == "command")
|
||||
self.assertEqual(command["body"]["files"][0]["movieId"], 7331)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue