mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
fixed 'Cover'
This commit is contained in:
parent
b586886072
commit
b91ea776d1
@ -231,10 +231,13 @@ class FocusFrame(Gtk.Frame):
|
||||
|
||||
class Cover(object):
|
||||
def __init__(self, lib_path, song_file):
|
||||
self.lib_path=lib_path
|
||||
self.lib_path=lib_path or "/"
|
||||
self.path=None
|
||||
if not song_file == None:
|
||||
head_tail=os.path.split(song_file)
|
||||
if self.lib_path[-1] == "/":
|
||||
path=(self.lib_path+head_tail[0]+"/")
|
||||
else:
|
||||
path=(self.lib_path+"/"+head_tail[0]+"/")
|
||||
if os.path.exists(path):
|
||||
filelist=[file for file in os.listdir(path) if file.endswith('.jpg') or file.endswith('.png') or file.endswith('.gif')]
|
||||
@ -420,10 +423,10 @@ class Client(AutoSettingsClient):
|
||||
self.emitter.emit("mixer")
|
||||
self.emitter.emit("update")
|
||||
|
||||
def on_file_changed(self, *args): #TODO
|
||||
def on_file_changed(self, *args):
|
||||
if not self.song_to_delete == "":
|
||||
status=self.status()
|
||||
if not status["song"] == "0":
|
||||
if not status["song"] == "0": #TODO
|
||||
if self.playlistinfo()[0]["file"] == self.song_to_delete:
|
||||
self.delete(0)
|
||||
self.song_to_delete=""
|
||||
|
Loading…
Reference in New Issue
Block a user