SupItsZaire / rockbox-cover-art-fixer

A python script, to help with Rockbox cover art conversion.
GNU General Public License v3.0
6 stars 2 forks source link

trying to run it on my library, getting this error #2

Open kekkodance opened 2 months ago

kekkodance commented 2 months ago
Checking directory: H:/Music/ipod\BRAT (2024)
Image files found in the directory:
1. AlbumArtSmall.jpg
2. AlbumArt_{B5020207-474E-4720-9F7A-6C76C714AC00}_Large.jpg
3. AlbumArt_{B5020207-474E-4720-9F7A-6C76C714AC00}_Small.jpg
4. Folder.jpg
Enter the number of the image file you want to use as the cover image: 2
Selected image file 'AlbumArt_{B5020207-474E-4720-9F7A-6C76C714AC00}_Large.jpg' set as cover image.
Deleted redundant image file 'AlbumArtSmall.jpg'.
Deleted redundant image file 'AlbumArt_{B5020207-474E-4720-9F7A-6C76C714AC00}_Small.jpg'.
Deleted redundant image file 'Folder.jpg'.
Traceback (most recent call last):
  File "C:\Users\Kekko\Desktop\rockbox-cover-art-fixer\rockboxalbumfix.py", line 263, in <module>
    process_images(root_directory)
  File "C:\Users\Kekko\Desktop\rockbox-cover-art-fixer\rockboxalbumfix.py", line 219, in process_images
    extract_cover_ffmpeg(
  File "C:\Users\Kekko\Desktop\rockbox-cover-art-fixer\rockboxalbumfix.py", line 99, in extract_cover_ffmpeg
    if flac_files:
       ^^^^^^^^^^
UnboundLocalError: cannot access local variable 'flac_files' where it is not associated with a value
kekkodance commented 2 months ago

running it on DAMN returns this also

Checking directory: H:/Music/ipod/2017 - DAMN\DAMN
Running ffmpeg command for 'H:/Music/ipod/2017 - DAMN\DAMN\01 BLOOD..flac'

ffmpeg command output:
ffmpeg command error: ffmpeg version 7.0.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Input #0, flac, from 'H:/Music/ipod/2017 - DAMN\DAMN\01 BLOOD..flac':
  Metadata:
    ARTIST          : Kendrick Lamar
    ALBUM           : DAMN.
    DATE            : 2017-04-13
    album_artist    : Kendrick Lamar
    track           : 1
    TRACKTOTAL      : 14
    TITLE           : BLOOD.
    DISCTOTAL       : 1
    ORGANIZATION    : Top Dawg Entertainment
    GENRE           : Rap
    ENCODER         : reference libFLAC 1.3.0 20130526
    LYRICS          : <!--sse-->
                    :  [Intro: Bēkon]
                    : Is it wickedness?
                    : Is it weakness?
                    : You decide
                    : Are we gonna live or die?
                    :
                    : [Verse: Kendrick Lamar]
                    : So I was takin' a walk the other day, and I seen a woman—a blind woman—pacin' up and down the sidewalk. She seemed to be a bit frustrated, as if she had dropped somethin' and havin' a hard time findin' it. So after watchin' her struggle for a while, I
                    :
                    : {Gunshot}
                    :
                    : [Bridge: Bēkon]
                    : Is it wickedness?
                    :
                    : [Outro]
                    : Lamar stated his views on police brutality with that line in the song, quote: "And we hate the popo, wanna kill us in the street fo' sho'…"
                    : Oh please, ugh, I don't like it.
                    :
                    :  <!--/sse-->
  Duration: 00:01:58.07, start: 0.000000, bitrate: 681 kb/s
  Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Output #0, image2, to 'C:\Users\Kekko\AppData\Local\Temp\cover_extraction_temp\cover_extraction_temp\cover.jpg':
[out#0/image2 @ 00000165ceba96c0] Output file does not contain any stream
Error opening output file C:\Users\Kekko\AppData\Local\Temp\cover_extraction_temp\cover_extraction_temp\cover.jpg.
Error opening output files: Invalid argument

2 folder(s) processed.

No folders to process. Exiting.
PS C:\Users\Kekko\Desktop\rockbox-cover-art-fixer>