summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorjerous <jerous@gmail.com>2008-11-04 21:41:18 +0100
committerjerous <jerous@gmail.com>2008-11-04 21:41:18 +0100
commit46c7d6ae826d719bd7c921813b870940c368c473 (patch)
tree17b494732f48ae4798c2558ee0f08e540ea9b15f /plugins
parent9b137e55d67678d07fe0819b73e8508d1ccc9324 (diff)
AlbumCover: fixie wixie: always copy the file when setting manually
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AlbumCover.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/AlbumCover.py b/plugins/AlbumCover.py
index 4e43cf3..0323e96 100644
--- a/plugins/AlbumCover.py
+++ b/plugins/AlbumCover.py
@@ -37,10 +37,15 @@ class wgAlbumCover(QtGui.QWidget):
, "Images ("+" ".join(map(lambda ext: "*.%s"%(ext), ALBUMCOVER_GFX_EXTS_DEFAULT.split(',')))+")"
)
if file:
- cur=self.getLocalACPath(monty.getCurrentSong(), True)
+ cur=self.getLocalACPath(song, probe=True)
# remove the previous cover
try:
- os.remove(cur)
+ if cur:
+ self.p.extended("removing %s"%(cur))
+ os.remove(cur)
+ else:
+ cur=self.getLocalACPath(song, probe=False)
+ self.p.extended("copy %s to %s"%(file, cur))
shutil.copy(file, cur)
except Exception, e:
self.p.normal("failed to set new cover: %s"%(str(e)))