mirror of
https://github.com/beetbox/beets.git
synced 2025-12-09 18:12:19 +01:00
mpdstats: use expanduser() on the music directory path
This commit is contained in:
parent
058e3adbef
commit
00fa333570
1 changed files with 4 additions and 4 deletions
|
|
@ -171,12 +171,12 @@ class Client(object):
|
|||
""" Update the beets item. Set attribute to value or increment the
|
||||
value of attribute.
|
||||
"""
|
||||
if not item is None:
|
||||
if item is not None:
|
||||
changed = False
|
||||
if not value is None:
|
||||
if value is not None:
|
||||
changed = True
|
||||
item[attribute] = value
|
||||
if not increment is None:
|
||||
if increment is not None:
|
||||
changed = True
|
||||
item[attribute] = (float)(item.get(attribute, 0)) + increment
|
||||
if changed:
|
||||
|
|
@ -308,7 +308,7 @@ class MPDStatsPlugin(plugins.BeetsPlugin):
|
|||
'host' : None,
|
||||
'port' : None,
|
||||
'password' : None,
|
||||
'music_directory' : config['directory'].get(unicode),
|
||||
'music_directory' : os.expanduser(config['directory'].get(unicode)),
|
||||
'rating' : True,
|
||||
'rating_mix' : 0.75,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue