Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mpd widget not showing cover art (symlink needed) #393

Closed
Incognito4nonymous opened this issue May 9, 2018 · 24 comments
Closed

Mpd widget not showing cover art (symlink needed) #393

Incognito4nonymous opened this issue May 9, 2018 · 24 comments

Comments

@Incognito4nonymous
Copy link

awesome v4.2 (Human after all)
• Compiled against Lua 5.3.4 (running with Lua 5.3)
• D-Bus support: ✔
• execinfo support: ✔
• xcb-randr version: 1.4
• LGI version: 0.9.2
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio

So I'm back after... This :
#227

And I finally managed to make my way out of the version problems I faced back then, and I'm now back with all things patched up, but surprisingly enough, I still got the issue on my Slackware...

When I play music from an album, it will just display the track informations, but no cover art despite having created mpdcover.png/jpg in /tmp.

@lcpz
Copy link
Owner

lcpz commented May 9, 2018

The widget has changed since then.

There is no more external script to fetch the cover and put it into /tmp. Now the widget retrieves it directly from your music folders. Please read the mpd wiki again.

@Incognito4nonymous
Copy link
Author

Oh, I'm not longer using the version that required the external script, I think it was mpdcover, I'm using a commit that's from june 2017, and it didn't used that anymore, anyway I updated the mpd widget to the latest commit, and still no cover art displaying despite the updates. So for some reason the issue is still ongoing...
My system is Slackware 14.2 64bits.

@lcpz
Copy link
Owner

lcpz commented May 9, 2018

Assuming that you've correctly set the input table and that you have an image file in the album folder which is in the format *.(jpg|jpeg|png|gif)$, then the only possible issue is that this find is not working for you. Try spawning the same command in the shell and see what it does on you machine.

Also, check if this happens because of special characters or not.

@Incognito4nonymous
Copy link
Author

Hummm, how am I spawning this in console ? (Sorry for Noobishness)

@lcpz
Copy link
Owner

lcpz commented May 10, 2018

Let's try in a different way. Put the following code in lain/widget/mpd.lua after this line:

naughty.notify { text = cover, timeout = 0 }

Start mpd, play a song, and give me:

  1. a screenshot of the notifications that will appear;
  2. full path and ls -A of the album folder of the current song.

@Incognito4nonymous
Copy link
Author

Incognito4nonymous commented May 10, 2018

tosend2018-05-10-223959_1366x768_scrot

Fatboy Slim - 10th and Crenshaw.mp3 Fatboy Slim - Everybody Needs A 303.mp3 Fatboy Slim - First Down.mp3 Fatboy Slim - Give The PoMan A Break.mp3 Fatboy Slim - Going Out of My Head.mp3 Fatboy Slim - Punk to Funk.mp3 Fatboy Slim - Santa Cruz Extended.mp3 Fatboy Slim - Song for Lindy.mp3 Fatboy Slim - The Sound of Milwaukee.mp3 Fatboy Slim - The Weekend Starts Here.mp3 cover.jpg

/ntfs/Users/Incognito/Music/Fatboy Slim - Better Living Through Chemestry

Here

@lcpz
Copy link
Owner

lcpz commented May 10, 2018

As supposed, the find command doesn't get cover.jpg.

Try this command in shell, see how you can make it work to get such file.

find '/ntfs/Users/Incognito/Music/Fatboy Slim - Better Living Through Chemestry' -maxdepth 1 -type f | egrep -i -m1 '*.(jpg|jpeg|png|gif)$'

@Incognito4nonymous
Copy link
Author

Incognito4nonymous commented May 10, 2018

Here's the output

/ntfs/Users/Incognito/Music/Fatboy Slim - Better Living Through Chemestry/cover.jpg

Which really gets me lost now... It seems to get the file....

@lcpz
Copy link
Owner

lcpz commented May 11, 2018

Obviously something is lost on Lua side when parsing wildcards. Try setting cover_pattern input to cover.jpg, cover.*, or whatever pattern you can think of.

@Incognito4nonymous
Copy link
Author

Heck, even tried to link it to a single file and it didn't worked... And yea, I have imagemagick installed... I really don't get it, it works out of the box on Debian...

@lcpz
Copy link
Owner

lcpz commented May 11, 2018

Imagemagick is not required anymore. The widget just need to grab the correct path.

I don't know what to think. Try to figure out what is missing on your Slack distro.

@lcpz
Copy link
Owner

lcpz commented Jun 15, 2018

@Incognito4nonymous Any updates on this?

@Incognito4nonymous
Copy link
Author

Still stuck mang...

@lcpz
Copy link
Owner

lcpz commented Jul 14, 2018

Could it be possible that the full path is right, but it needs to be escaped?

Try with directories and files that don't have whitespaces or special characters.

@Incognito4nonymous
Copy link
Author

Still doesn't work, I already tried that a while ago and just also re-tried, again I tried on my Debian system and it works flawlessly, and I got the same Awesome configuration on both of em.

@Incognito4nonymous
Copy link
Author

Pardon me, my mouse slipped and I pressed "Close and Comment" Rather than "Comment"

@lcpz
Copy link
Owner

lcpz commented Jul 15, 2018

You might try to find on reddit other Slackware users and see if they can replicate the issue.

Other than that, I don't know what to do here.

@lcpz lcpz changed the title Mpd widget not showing cover art Mpd widget not showing cover art on Slackware 14.2 Aug 31, 2018
@Incognito4nonymous
Copy link
Author

Back, but with Debian 9.6 making my machine run this time, running Awesome 4.2 compiled against Lua 5.3.3, and hum, seemingly it ain't Slackware specific, maybe has it something to do with the fact my music is stored in a ntfs partition ?
I'm definitely decided to get over this this time, there's nothing pushing me back anymore

@Incognito4nonymous Incognito4nonymous changed the title Mpd widget not showing cover art on Slackware 14.2 Mpd widget not showing cover art Nov 26, 2018
@Incognito4nonymous
Copy link
Author

An idea just striked me like a nuclear bomb. If it works on my raspberry pi that has the music folder in the user directory, what prevents it from working here must be the fact the music files are stored on another partition (NTFS one) the partition's format shouldn't be what causes a problem in my opinion, and I may have found a quick and dirty fix, I'm gonna see what happens if I replace my user music folder with a symlink pointing towards the desired repertory

@Incognito4nonymous
Copy link
Author

It just worked ! I can't believe I resolved this issue by myself !
It should be added to wiki that it is preferable to create a symlink to the folder containing the music for the widget to function properly, closing the issue !

@lcpz
Copy link
Owner

lcpz commented Nov 29, 2018

You have edit rights for the wiki, can you please update it yourself, reporting the example of how you created the symlink in your specific case?

@lcpz lcpz changed the title Mpd widget not showing cover art Mpd widget not showing cover art (symlinks Nov 29, 2018
@lcpz lcpz changed the title Mpd widget not showing cover art (symlinks Mpd widget not showing cover art (symlink needed) Nov 29, 2018
@lcpz
Copy link
Owner

lcpz commented Dec 1, 2018

I updated the wiki by myself.

@Incognito4nonymous
Copy link
Author

Incognito4nonymous commented Dec 1, 2018

Daym, I just received the mail now, you outran me.
Also, honored to have been given the edit rights man.

@Incognito4nonymous
Copy link
Author

There we go, just added a bit of detail about that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants