Improve auto-download title and series controls

This commit is contained in:
Dymas
2026-05-25 10:02:32 +02:00
parent 3d42657837
commit baea85e24c
8 changed files with 67 additions and 20 deletions
+6 -2
View File
@@ -1519,6 +1519,7 @@ class AutoDownloadQueueTests(unittest.TestCase):
"auto_download_mode": "dub",
"auto_download_quality": "best",
"auto_download_name": 'Queue Show: Alt/Name',
"auto_download_series": "3",
}
download_queue = mock.Mock()
download_queue.covered_episodes.return_value = {"11"}
@@ -1549,7 +1550,7 @@ class AutoDownloadQueueTests(unittest.TestCase):
"query": "Queue Show",
"title": "Queue Show",
"anime_name": "Queue Show- Alt-Name",
"season": "1",
"season": "3",
"index": 2,
"mode": "dub",
"quality": "best",
@@ -1841,7 +1842,7 @@ class HandlerRouteTests(unittest.TestCase):
self.assertEqual(handler.json_status, HTTPStatus.CREATED)
def test_watchlist_auto_download_settings_post_returns_updated_item(self):
body = b'{"show_id":"show-1","mode":"dub","quality":"best","name":"Example Name"}'
body = b'{"show_id":"show-1","mode":"dub","quality":"best","name":"Example Name","series":"2"}'
handler = DummyHandler("/api/watchlist/update-auto-download", body=body, content_length=len(body))
payload = {"message": "Saved auto-download settings for Show 1.", "item": {"show_id": "show-1"}}
handler.handler_context = mock.Mock(update_watchlist_auto_download=mock.Mock(return_value=payload))
@@ -1947,6 +1948,9 @@ class TemplateHelperTests(unittest.TestCase):
self.assertIn('api("/api/watchlist/update-auto-download"', APP.WATCHLIST_HTML)
self.assertIn("Save auto-download", APP.WATCHLIST_HTML)
self.assertIn("Manual add does not trigger it", APP.WATCHLIST_HTML)
self.assertIn("Name source", APP.WATCHLIST_HTML)
self.assertIn("Custom", APP.WATCHLIST_HTML)
self.assertIn("Series", APP.WATCHLIST_HTML)
def test_watchlist_thumbnail_warmup_skips_repeated_attempts(self):
self.assertIn("thumbnailWarmupPending: new Set()", APP.WATCHLIST_HTML)