refactor: Refactor mpegdash patch logic and update import ordering

This commit is contained in:
Warry
2026-01-23 11:52:09 +01:00
parent 651daa9ca9
commit 0ed90ba8c2
2 changed files with 41 additions and 38 deletions
+6 -6
View File
@@ -1,10 +1,4 @@
#!/usr/bin/env python
# Apply mpegdash patch before any tidalapi imports to fix TIDAL manifest parsing
# See: https://github.com/FunWarry/tidal-dl-ng-For-DJ/issues/15
from tidal_dl_ng.helper.mpegdash_patch import apply_mpegdash_patch
apply_mpegdash_patch()
import importlib.metadata
from pathlib import Path
from urllib.parse import urlparse
@@ -13,8 +7,14 @@ import requests
import toml
from tidal_dl_ng.constants import REQUESTS_TIMEOUT_SEC
# Apply mpegdash patch before any tidalapi imports to fix TIDAL manifest parsing
# See: https://github.com/FunWarry/tidal-dl-ng-For-DJ/issues/15
from tidal_dl_ng.helper.mpegdash_patch import apply_mpegdash_patch
from tidal_dl_ng.model.meta import ProjectInformation, ReleaseLatest
apply_mpegdash_patch()
def metadata_project() -> ProjectInformation:
result: ProjectInformation