Pass search season into watchlist auto-download
This commit is contained in:
+11
@@ -1036,6 +1036,14 @@ class WatchlistCompletionTests(unittest.TestCase):
|
||||
self.assertEqual(result["item"]["status"], "queued")
|
||||
self.assertIn("Refresh queued", result["message"])
|
||||
|
||||
def test_add_uses_requested_auto_download_series(self):
|
||||
with mock.patch.object(APP.WATCHLIST, "schedule_refresh", side_effect=lambda show_id, source="manual": APP.WATCHLIST.get(show_id)):
|
||||
result = APP.WATCHLIST.add(
|
||||
{"show_id": "show-23", "title": "Queued Show", "category": "watching", "auto_download_series": "4"}
|
||||
)
|
||||
|
||||
self.assertEqual(result["item"]["auto_download_series"], "4")
|
||||
|
||||
def test_refresh_uses_bounded_request_timeout(self):
|
||||
self.seed_watchlist_item(show_id="show-1", title="Example Show")
|
||||
snapshot = {
|
||||
@@ -1951,6 +1959,9 @@ class TemplateHelperTests(unittest.TestCase):
|
||||
self.assertIn("async function api(path, options = {})", APP.CONFIG_HTML)
|
||||
self.assertIn("async function api(path, options = {})", APP.WATCHLIST_HTML)
|
||||
|
||||
def test_search_page_sends_watchlist_auto_download_series(self):
|
||||
self.assertIn('auto_download_series: $("seasonInput").value || "1"', APP.INDEX_HTML)
|
||||
|
||||
def test_pages_share_serial_polling_helper(self):
|
||||
self.assertIn("function startSerialPoll(callback, intervalMs)", APP.QUEUE_HTML)
|
||||
self.assertIn("function startSerialPoll(callback, intervalMs)", APP.WATCHLIST_HTML)
|
||||
|
||||
Reference in New Issue
Block a user