PhilipTrauner/cmus-osx

Show album art in notification

piersolenski opened this issue · 10 comments

This would be great!

yes for sure!, but:

  • as long as cmus-osx solely depends on cmus reported data, and the cmus does not report the album art, it's not directly possible.
  • the other options is to parse/extract the album art from the file path of active song, and then display it in notification center. this approach adds more dependency (id3 tag parser) and possible lags.

I would be great if someone introduce a better approach.

Perhaps using something along the lines of this? https://github.com/cmus/cmus/wiki/cmus_status.py

yes, that snippet uses a 3rd party dependency mutagen as id3 tag parser (second approach)

there are lots of id3 tag parsers out there, will try to experiment with them.

Awesome!

@superfunkminister

please update and re-install. from v1.1.0 album art is also supported.

So I followed the following steps:

  • Installed python and objective-c via pip
  • Uninstalled and reinstalled cmus-osx

I now get the message verified: 'pyobjc' has been found. info: if you want to see albmum art thumbnail in notification center, please install 'eyeD3' by 'pip' or see the README.md for more information. on installation, even though I already have eyeD3. On running cmus I don't see any album art, just the default rocket icon.

I'm not sure if it's related but I also seem to have the media keys functionality, I saw a message about my com.apple.rcd.plist the first time I ran after reinstalling but haven't seen it since...

setup warning

well it means your active version of python is not able to find eyeD3.

please try:

$> /usr/bin/env python

# now type
import eyed3

if you got any error, the eyeD3 is not already there (may be you've installed it for another python version)

rcd warning

it's all about itunes service who listens the media keys, and the warning says that the service is already unloaded (quite normal)

/usr/bin/env python                                                                                                                                                               [20:21:07]
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import eyed3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named eyed3
>>>

My version of Python is installed via Homebrew if that helps, although I installed both pyobjc and eyed3 via pip and it finds pyobjc?

I see, please try:

$> export PATH=/usr/bin:$PATH
$> pip install eyeD3

in the same terminal, open python:

import sys
print(sys.path) # the Apple (default) python library path

# this line should not throw
import eyed3

Okay messing around with my Homebrew path has fixed it! Thanks, works like a charm!