feat(log): record each HTTP attempt in the debug log with debug_requests

This commit is contained in:
imSp4rky
2026-11-27 18:05:00 -07:00
parent 0e2cedcdbe
commit 438419ab1b
24 changed files with 1132 additions and 107 deletions
+2 -1
View File
@@ -24,7 +24,7 @@ from unshackle.core.manifests import DASH, HLS, ISM, MissingLanguageError, snaps
from unshackle.core.proxies.resolve import REGION_QUERY
from unshackle.core.remote_protocol import APIErrorCode, coded
from unshackle.core.remote_service import resolve_proxy_arg, segment_uri_filter
from unshackle.core.session import failure_response, utf8_text
from unshackle.core.session import failure_response, record_requests, utf8_text
from unshackle.core.title_source import KeyArrival, TitleSource
from unshackle.core.titles import Episode, Movies, Series, Title_T, Titles_T, remap_titles
from unshackle.core.tracks import Audio, Chapter, Chapters, Subtitle, Tracks, Video
@@ -269,6 +269,7 @@ class ImportService(TitleSource):
else next((r["headers"] for r in first.tracks if r.get("url") and r.get("headers")), {})
)
self.session = self.build_session(ctx, self.region, headers)
record_requests(self.session)
@staticmethod
def legacy_entry(entry: mediaexport.Entry) -> dict[str, Any]: