From 00fa3335708bed16fe12b76ec39eb48cb3e45fdd Mon Sep 17 00:00:00 2001 From: Philippe Mongeau Date: Sun, 3 Nov 2013 21:51:44 -0500 Subject: [PATCH] mpdstats: use expanduser() on the music directory path --- beetsplug/mpdstats.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beetsplug/mpdstats.py b/beetsplug/mpdstats.py index 991e4453c..a29fe4580 100644 --- a/beetsplug/mpdstats.py +++ b/beetsplug/mpdstats.py @@ -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, })