eworm-de / mpd-notification

Notify about tracks played by mpd
GNU General Public License v3.0
86 stars 23 forks source link

change default cover name #13

Closed eoli3n closed 8 years ago

eoli3n commented 8 years ago

Hi, I renamed every cover files as folder.(jpg|png). It works well. But the problem is that i use O!MPD mpd client, which print big covers, so i need them to be in a good resolution. O!MPD search for files named as folder.png, as mpd-notification. The problem is that my notification daemon (dunst) prints cover as it finds it, if the cover is 800x800, it prints me a ~ 800x850 notification. I want to generate cover_thumbs.(jpg|png), 200x200 with imagemagick and then tell to mpd-notification to looks at these files.

Have a nice day.

eworm-de commented 8 years ago

I reworked parts of the artwork stuff:

Can you please try the branch pixbuf?

eoli3n commented 8 years ago

Standalone lauch still not working, so I did

git clone https://github.com/eworm-de/mpd-notification
git checkout pixbuf
make
systemctl --user stop mpd-notification
mv mpd-notification /usr/bin/
# edit mpd-notification.service
systemctl --user start mpd-notification

Here my .service file

[Unit]
Description=MPD Notification
Requires=mpd.service

[Service]
Type=simple
ExecStart=/usr/bin/mpd-notification -v -t 5 -m /home/music -s 200x200

[Install]
WantedBy=default.target

Then i checked if pixbuf was installed

# pacman -Qs pixbuf
local/gdk-pixbuf2 2.34.0-2

Still not working. Then Icon which was displayed at wrong resolution, now are not displayed. journalctl doesnt warn any error

Another thing, i saw in dunst log

 Could not load icon: 'audio-x-generic'

So i installed gnome-icon-theme, it does not work more. Thx for helping

eoli3n commented 8 years ago

Oups sorry, i dont know what i missed, i retried and then

 user@osz  ~/dev/git/mpd-notification   pixbuf  ./mpd-notification -v -t 5 -m /home/music -s 200x200
./mpd-notification: mpd-notification v0.7.5-4-g120544f (compiled: Oct  5 2016, 20:48:06)
./mpd-notification: using notification-timeout 5000
./mpd-notification: using music-dir /home/music
./mpd-notification: found artwork in or near media file: /home/music/Demi Portion - Dragon Rash 2015/01 De ma planète.mp3
./mpd-notification: Playing <b>De ma planète</b>
by <i>Demi Portion</i>
from <i>Dragon Rash</i>

But it still dont print artwork and still the error

 Could not load icon: 'audio-x-generic'
eworm-de commented 8 years ago

Looks like you may be interested in these dunst issues:

I added a workaround to make it work for you. With latest commit there is a new option --notification-file-workaround. Please note that the scale option expects a single numeric value only. So your command should look like:

mpd-notification -v -t 5 -m /home/music -s 200 --notification-file-workaround
eoli3n commented 8 years ago

--notification-file-workaroung is working. Thx a lot Will you keep that option named like that ? and merge it to the master branch ?

eworm-de commented 8 years ago

Yes, I will keep the option naming (so no short version) and yes, I will merge to master. Thanks a lot for testing!