On import, only replace files with file of same type (mp3, flac) #281
Owner
No description provided.
bug
label
Author
Owner
```
File "/home/kae/mm/./app/musicmuster.py", line 1395, in preview
1374 def preview(self) -> None:
(...)
1391 else:
1392 return
1393 if not track_info:
1394 return
--> 1395 self.preview_manager.set_track_info(track_info)
1396 self.preview_manager.play()
..................................................
self = <__main__.Window object at 0x7fe37d77a8c0>
track_info = TrackInfo (1449, 48, )
self.preview_manager.set_track_info = <method 'PreviewManager.set_track_info' of <__main__.Preview
Manager object at 0x7fe37d071f90> musicmuster.py:244>
self.preview_manager.play = <method 'PreviewManager.play' of <__main__.PreviewManager ob
ject at 0x7fe37d071f90> musicmuster.py:222>
..................................................
File "/home/kae/mm/./app/musicmuster.py", line 261, in set_track_info
244 def set_track_info(self, info: TrackInfo) -> None:
(...)
257 # Check file readable
258 if file_is_unreadable(self.path):
259 raise ValueError(f"PreviewManager.__init__: {track.path=} unreadable")
260
--> 261 mixer.music.load(self.path)
..................................................
self = <__main__.PreviewManager object at 0x7fe37d071f90>
info = TrackInfo (1449, 48, )
self.path = '/home/kae/music/Bruce Springsteen/Born To Run (Japanese Pre
ssing)/04. Backstreets.flac'
..................................................
error: FLAC__stream_decoder_process_until_end_of_metadata() failed
```
Author
Owner
```
File "/home/kae/mm/app/file_importer.py", line 670, in run
618 def run(self) -> None:
(...)
666 log.error(f"Unable to retrieve {self.track_id=}")
667 return
668 session.commit()
669
--> 670 helpers.normalise_track(self.destination_track_path)
671
..................................................
self = <DoTrackImport(id=0x7fe355dfc5e0, import_file_path=/home/kae
/music/Singles/tmp/Backstreets - Bruce Springsteen.mp3
log.error = <method 'Logger.error' of <Logger musicmuster (DEBUG)> __ini
t__.py:1508>
session.commit = <method 'Session.commit' of <sqlalchemy.orm.session.Session
object at 0x7fe338355f90> session.py:1996>
helpers.normalise_track = <function 'normalise_track' helpers.py:285>
self.destination_track_path = '/home/kae/music/Bruce Springsteen/Born To Run (Japanese Pre
ssing)/04. Backstreets.flac'
..................................................
File "/home/kae/mm/app/helpers.py", line 296, in normalise_track
285 def normalise_track(path: str) -> None:
(...)
292 f"helpers.normalise_track({path}): " f"File type {ftype} not implemented"
293 )
294
295 bitrate = mediainfo(path)["bit_rate"]
--> 296 audio = get_audio_segment(path)
297 if not audio:
..................................................
path = '/home/kae/music/Bruce Springsteen/Born To Run (Japanese Pre
ssing)/04. Backstreets.flac'
bitrate = '320405'
..................................................
File "/home/kae/mm/app/helpers.py", line 101, in get_audio_segment
96 def get_audio_segment(path: str) -> Optional[AudioSegment]:
97 try:
98 if path.endswith(".mp3"):
99 return AudioSegment.from_mp3(path)
100 elif path.endswith(".flac"):
--> 101 return AudioSegment.from_file(path, "flac") # type: ignore
102 except AttributeError:
..................................................
path = '/home/kae/music/Bruce Springsteen/Born To Run (Japanese Pre
ssing)/04. Backstreets.flac'
..................................................
File "/home/kae/.cache/pypoetry/virtualenvs/musicmuster-21R3m3EB-py3.11/lib/python3.11/site-packages/pydub/audio_segment.py", line 773, in from_file
645 def from_file(cls, file, format=None, codec=None, parameters=None, start_second=None, duration=None, **kwargs):
(...)
769
770 if p.returncode != 0 or len(p_out) == 0:
771 if close_file:
772 file.close()
--> 773 raise CouldntDecodeError(
774 "Decoding failed. ffmpeg returned error code: {0}\n\nOutput from ffmpeg/avlib:\n\n{1}".format(
..................................................
file = <_io.BufferedReader name='/home/kae/music/Bruce Springsteen/
Born To Run (Japanese Pressing)/04. Backstreets.flac'>
format = 'flac'
codec = None
parameters = None
start_second = None
duration = None
kwargs = {}
p.returncode = 1
p_out = b''
close_file = True
..................................................
---- (full traceback above) ----
File "/home/kae/mm/app/file_importer.py", line 670, in run
helpers.normalise_track(self.destination_track_path)
File "/home/kae/mm/app/helpers.py", line 296, in normalise_track
audio = get_audio_segment(path)
File "/home/kae/mm/app/helpers.py", line 101, in get_audio_segment
return AudioSegment.from_file(path, "flac") # type: ignore
File "/home/kae/.cache/pypoetry/virtualenvs/musicmuster-21R3m3EB-py3.11/lib/python3.11/site-packages/pydub/audio_segment.py", line 773, in from_file
raise CouldntDecodeError(
CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1
Output from ffmpeg/avlib:
ffmpeg version 5.1.6-0+deb12u1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-libsmbclient
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
[flac @ 0x556c3a8211c0] Could not find codec parameters for stream 0 (Audio: flac, 0 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, flac, from '/home/kae/music/Bruce Springsteen/Born To Run (Japanese Pressing)/04. Backstreets.flac':
Metadata:
title : Backstreets
artist : Bruce Springsteen
track : 4/8
album : Born to Run
disc : 1/1
genre : Rock
TORY : 1975
MusicBrainz Release Track Id: 8e318d76-16b2-4a03-b89d-4adcdba1940c
TMED : Reel-to-reel
SCRIPT : Latn
album_artist : Bruce Springsteen
TSO2 : Springsteen, Bruce
artist-sort : Springsteen, Bruce
originalyear : 1975
CATALOGNUMBER : 40-80959
TSRC : USSM17800214/USSM19904338
ARTISTS : Bruce Springsteen
MusicBrainz Album Type: album
MusicBrainz Album Status: official
MusicBrainz Album Release Country: NL
Acoustid Id : ec17dc73-dfe9-4678-830f-da48e0988131
publisher : CBS International Manufacturing And Service Center
MusicBrainz Album Id: e580ecb9-aba7-4042-a859-e64d97f28df9
MusicBrainz Artist Id: 70248960-cb53-4ea4-943a-edb18f7d336f
MusicBrainz Album Artist Id: 70248960-cb53-4ea4-943a-edb18f7d336f
MusicBrainz Release Group Id: 39b22944-7503-3937-8bba-09b17281cc6a
date : 1982
Duration: N/A, bitrate: N/A
Stream #0:0: Audio: flac, 0 channels
Stream mapping:
Stream #0:0 -> #0:0 (flac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Conversion failed!
```
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?