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

mopidy-scan not using correct LOCAL_MUSIC_PATH default #189

Closed
jodal opened this issue Sep 11, 2012 · 4 comments
Closed

mopidy-scan not using correct LOCAL_MUSIC_PATH default #189

jodal opened this issue Sep 11, 2012 · 4 comments
Assignees
Labels
C-bug Category: This is a bug
Milestone

Comments

@jodal
Copy link
Member

jodal commented Sep 11, 2012

~/music exists and got music in it. LOCAL_MUSIC_PATH is not set in my settings file, i.e. it should default to ~/music.

$ PYTHONPATH=. ./bin/mopidy-scan 
INFO     2012-09-11 15:56:32,431 [15354:MainThread] root
  Scanning None
Traceback (most recent call last):
  File "./bin/mopidy-scan", line 26, in <module>
    scanner = Scanner(settings.LOCAL_MUSIC_PATH, store, debug)
  File "/home/jodal/dev/mopidy/mopidy/scanner.py", line 55, in __init__
    self.uris = [path_to_uri(f) for f in find_files(folder)]
  File "/home/jodal/dev/mopidy/mopidy/utils/path.py", line 53, in find_files
    if os.path.isfile(path):
  File "/home/jodal/dev/virtualenvs/mopidy/lib/python2.7/genericpath.py", line 29, in isfile
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found
@ghost ghost assigned adamcik Sep 11, 2012
@adamcik
Copy link
Member

adamcik commented Sep 15, 2012

~/.config/user-dirs.locale's XDG_MUSIC_DIR entry might be better default. Though on my system it is currently just set to ~. Could you test running xdg-user-dir MUSIC and tell me what it says?

@adamcik
Copy link
Member

adamcik commented Sep 15, 2012

I would suggest we default to glib.get_user_special_dir(glib.USER_DIRECTORY_MUSIC) when LOCAL_MUSIC_PATH is None.

@jodal
Copy link
Member Author

jodal commented Sep 15, 2012

$ xdg-user-dir MUSIC
/home/jodal/

Note that I've deleted all the default Ubuntu dirs, except Desktop and Downloads.

As long as we don't scan dotfiles directories, I don't think using the home dir as default value is a problem.

jodal added a commit that referenced this issue Sep 16, 2012
@jodal
Copy link
Member Author

jodal commented Sep 16, 2012

Fixed by PR #200.

@jodal jodal closed this as completed Sep 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants