Skip to content

Commit

Permalink
check for album art
Browse files Browse the repository at this point in the history
  • Loading branch information
chapmanjacobd committed May 25, 2024
1 parent 2b26ebe commit 88e8ceb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xklb/mediafiles/process_ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def process_path(args, path, **kwargs):
if not is_animation:
return process_image.process_path(args, path)

video_stream = next((s for s in probe.video_streams), None)
def is_album_art(s):
return s.get('disposition', {}).get('attached_pic', 0) == 1

video_stream = next((s for s in probe.video_streams if not is_album_art(s)), None)
audio_stream = next((s for s in probe.audio_streams), None)
if not video_stream:
log.warning("No video stream found: %s", path)
Expand Down

0 comments on commit 88e8ceb

Please sign in to comment.