refactor(export): move the --export writer out of dl into core ExportWriter

This commit is contained in:
imSp4rky
2026-11-29 16:07:04 -07:00
parent 1ebc3e3624
commit 4bcc15dfc4
11 changed files with 471 additions and 413 deletions
+2 -3
View File
@@ -6,10 +6,9 @@ from datetime import date
import pytest
from unshackle.commands.dl import dl
from unshackle.core.config import Config, config
from unshackle.core.titles.episode import Episode
from unshackle.core.wire import build_title, serialize_title
from unshackle.core.wire import build_title, serialize_title, title_to_meta
SERIES = "{title}.{year?}.{season_episode}.{episode_name?}.{quality?}-{tag?}"
SPORTS = "{title}.{year?}.{date?}.{episode_name}.{quality?}-{tag?}"
@@ -90,7 +89,7 @@ def test_the_sport_flag_survives_the_remote_round_trip():
def test_the_sport_flag_survives_the_export_round_trip():
rebuilt = build_title(dl.title_to_meta(make_episode()), "TEST", fallback_id="x")
rebuilt = build_title(title_to_meta(make_episode()), "TEST", fallback_id="x")
assert isinstance(rebuilt, Episode) and rebuilt.sport