swingmx / swingmusic

Swing Music is a beautiful, self-hosted music player for your local audio files. Like a cooler Spotify ... but bring your own music.
https://swingmx.com
MIT License
678 stars 41 forks source link

PNG album cover size limit? #149

Closed Zyntaxyz closed 9 months ago

Zyntaxyz commented 9 months ago

I think my ~15 mb PNG album covers are too much for the scanner, how can i fix it?

INFO|Extracting track images ... 4%|█▋ |152/4134 Exception in thread Thread-8 (run_periodic_scans): Traceback (most recent call last): File "threading.py", line 1016, in _bootstrap_inner File "threading.py", line 953, in run File "app\periodic_scan.py", line 26, in run_periodic_scans File "app\lib\populate.py", line 87, in init File "app\lib\populate.py", line 268, in init File "tqdm\std.py", line 1182, in iter File "concurrent\futures_base.py", line 621, in result_iterator File "concurrent\futures_base.py", line 319, in _result_or_cancel File "concurrent\futures_base.py", line 451, in result File "concurrent\futures_base.py", line 403, in __get_result File "concurrent\futures\thread.py", line 58, in run File "app\lib\populate.py", line 226, in get_image File "app\lib\taglib.py", line 60, in extract_thumb File "PIL\Image.py", line 3277, in open File "PIL\Image.py", line 3263, in _open_core File "PIL\ImageFile.py", line 117, in init File "PIL\PngImagePlugin.py", line 734, in _open File "PIL\PngImagePlugin.py", line 203, in call File "PIL\PngImagePlugin.py", line 569, in chunk_zTXt File "PIL\PngImagePlugin.py", line 150, in _safe_zlib_decompress ValueError: Decompressed Data Too Large

cwilvx commented 9 months ago

Hello @Zyntaxyz

I'm suprised 15mb album covers exist. If you attach one of the files with the large images in your next comment, I can patch it up for you.

Zyntaxyz commented 9 months ago

Hello @Zyntaxyz

I'm suprised 15mb album covers exist. If you attach one of the files with the large images in your next comment, I can patch it up for you.

Github can't process files up to 10 mb, lol.

"Yowza that's a big file. Try again with a file size less than 10MB."

Here: https://mega.nz/folder/Bex21LRC#U8p2fSAwJNEIII3tMxd3Ow

cwilvx commented 9 months ago

@Zyntaxyz

I can't reproduce the error by setting the image as the thumbnail of an audio file. Can you tell me which os you're running so that I can create a build that will help you identify a specific audio file that can reproduce the error. You will then send it to me so that I can try fixing the issue using that specific audio file.

Zyntaxyz commented 9 months ago

@Zyntaxyz

I can't reproduce the error by setting the image as the thumbnail of an audio file. Can you tell me which os you're running so that I can create a build that will help you identify a specific audio file that can reproduce the error. You will then send it to me so that I can try fixing the issue using that specific audio file.

Windows 10 I just uploaded the audio file (FLAC) to same folder with the 15 mb attached cover. I semi-automatic tagged all my music library with mp3tag (7400~ songs, lot of them with 10-15 mb cover)

cwilvx commented 9 months ago

@Zyntaxyz

I can't reproduce the error using the given file. Try using the following build. It will print out the files being processed. When it fails, check the most recently printed file on the cmd and send that specific file:

It should print something like this:

Reading image: /home/cwilvx/Tidal/Playlist/Classic Oldies/Frankie Valli - Sherry.m4a
Reading image: /home/cwilvx/Tidal/Playlist/Greatful Dead Radio/moe - Nebraska.m4a

I have modified the image ripper to print out the correct file, so it will be slow.

Download the build from Google Drive.

https://drive.google.com/file/d/1GXMSOw7-XICjYMyreO11F_eNZbu-bpx_/view?usp=sharing

Zyntaxyz commented 9 months ago

@Zyntaxyz

I can't reproduce the error using the given file. Try using the following build. It will print out the files being processed. When it fails, check the most recently printed file on the cmd and send that specific file:

It should print something like this:

Reading image: /home/cwilvx/Tidal/Playlist/Classic Oldies/Frankie Valli - Sherry.m4a
Reading image: /home/cwilvx/Tidal/Playlist/Greatful Dead Radio/moe - Nebraska.m4a

I have modified the image ripper to print out the correct file, so it will be slow.

Download the build from Google Drive.

https://drive.google.com/file/d/1GXMSOw7-XICjYMyreO11F_eNZbu-bpx_/view?usp=sharing

Reading image: F:/FLAC Music/B/Ben Gold/Liberation - Single/101 - Liberation.flac Exception in thread Thread-8 (run_periodic_scans): Traceback (most recent call last): File "threading.py", line 1016, in _bootstrap_inner File "threading.py", line 953, in run File "app\periodic_scan.py", line 26, in run_periodic_scans File "app\lib\populate.py", line 86, in init File "app\lib\populate.py", line 277, in init File "app\lib\populate.py", line 225, in get_image File "app\lib\taglib.py", line 61, in extract_thumb File "PIL\Image.py", line 3277, in open File "PIL\Image.py", line 3263, in _open_core File "PIL\ImageFile.py", line 117, in init File "PIL\PngImagePlugin.py", line 734, in _open File "PIL\PngImagePlugin.py", line 203, in call File "PIL\PngImagePlugin.py", line 569, in chunk_zTXt File "PIL\PngImagePlugin.py", line 150, in _safe_zlib_decompress ValueError: Decompressed Data Too Large

Here's the file: https://mega.nz/folder/Bex21LRC#U8p2fSAwJNEIII3tMxd3Ow

cwilvx commented 9 months ago

Hello @Zyntaxyz

This issue has been fixed in the latest patch release: v1.3.1. You can download the new version in the release page.

Thank you for opening this issue.