repair downloader_song_legacy.py
repair downloader_song_legacy.py
This conversation tracked the comprehensive refactoring and bug-fixing of the AppleMusic-Downloader project. The work began by diagnosing why CN-region songs failed with a KeyError on extendedAssetUrls — fixed by switching to .get() with a fallback, and adding a webplayback-based stream path for songs without enhancedHls. We then extracted the entire download orchestration from cli.py (a Click-based CLI) into a new core_downloader.py module — a pure Python API with no terminal dependencies — and rewired both cli.py and download_worker.py (the GUI’s QThread) to call it directly, eliminating a class of Windows GUI crashes caused by Click’s stdin/stdout assumptions. We fixed download_worker.py’s variable name bug (remux_path vs remuxed_path) that silently dropped song files, normalized Path/str type handling, added CENC stream support (ISO-23001-7 with data:;base64, KIDs) by reconstructing Widevine PSSH boxes and passing real KIDs to mp4decrypt, switched ffmpeg remux from -f ipod to -f mp4 and added automatic fragmentation detection with fallback to aac_at/aac re-encoding for playable output, and added backward-compatible config migration for the renamed codec_song enum. We also fixed the Windows manifest name, updated the PyInstaller .spec with missing hidden imports, and corrected several type annotation issues across models.py, downloader.py, and downloader_song.py. The result is that both standard Widevine songs (e.g., ROSÉ’s toxic till the end) and CENC-encrypted songs (e.g., Queen’s Under Pressure via the 28:ctrp256 webplayback asset) now download and play correctly across all platforms.
really thanks deepseek help me to rebuild the interface
I updated the regular expression to account for Apple changing the location of the index.js file on the Apple Music web interface following WWDC2026. After removing redundant code, I used AI to add cross-platform compatibility support, moving closer to a full project refactor once the holidays are over. I also revamped the UI, implementing a card-stacking layout to make the logs easier to read. Huge thanks to AI—it has made fixing baffling bugs far more efficient.
👍the blogs works
I am currently fixing image path errors (404s) and cleaning up redundant files in my Next.js portfolio project, as well as adding a blog page with Markdown support. Additionally, after realizing that translation changes were unnecessary, I reverted the “About” page to its original state to ensure better overall consistency.
removed some photos. and I standardize some code and then create a 404 page terms page and skills page.
Preparing to add new features and migrate the tech stack for cross-platform builds next month. In this update, I leveraged AI to refine part of the code and manually optimized and removed redundant code.