Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-03-26 04:15:35

aldolo
Member
Registered: 2019-03-26
Posts: 1

Stop tumbler trying to make a thumbnail when last attempt failed

Using the Tumbler customized thumbnailers, I made one to use covers on ID3 tags as mp3 thumbnails.

#!/bin/dash
exiftool -picture -b "$2" 2>/dev/null | convert -thumbnail "$1" - "$3" 1>/dev/null 2>&1
exit $?

If the mp3 file has album art, there is no problem. But if the mp3 file lacks of a valid ID3 cover art, Tumbler will try to generate the thumbnail every time you enter on that directory.

Is there a method to tell Tumbler to stop and show the default mp3 icon on that files?

Offline

#2 2019-03-26 11:03:22

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,000

Re: Stop tumbler trying to make a thumbnail when last attempt failed

Hello and welcome.

As a note, tumbler has recently added the ability to support embedded media cover thumbnails like you are trying to do and will be available in the next release.

To answer your question, how about something like:

#!/bin/dash
if [[ $(exiftool -picture -b "$2" 2>/dev/null) ]]; then
   exiftool -picture -b "$2" 2>/dev/null | convert -thumbnail "$1" - "$3" 1>/dev/null 2>&1
fi
exit $?

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB