Issue #31 resolved

Fails to start when XDG_MUSIC_DIR is not defined

speps
created an issue

File "gsharkdown.py", line 124, in <module> CONFIG['down_path'] = os.path.join(glib.get_user_special_dir(glib.USER_DIRECTORY_MUSIC), "Grooveshark") File "/usr/lib/python2.7/posixpath.py", line 68, in join elif path == '' or path.endswith('/'): AttributeError: 'NoneType' object has no attribute 'endswith'

===

glib.USER_DIRECTORY_MUSIC fetches for XDG_MUSIC_DIR defined in ~/.config/user-dirs.dirs (xdg-user-dirs should be an optional dependency), when this is not, glib.USER_DIRECTORY_MUSIC is null causing os.path.join to fail.

The control should be enforced in the code so a fallback directory is chosen whenever a default music folder is not defined. Attached is a patch that solves this defaulting on ~/Music/Grooveshark on fail.

Comments (1)

  1. Log in to comment