parent
f0b59b8d23
commit
4687ef5288
@ -294,7 +294,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
def file_is_readable(self, path):
|
def file_is_readable(self, path):
|
||||||
"Return True if path is readable else False"
|
"Return True if path is readable else False"
|
||||||
|
|
||||||
return os.access(self.next_track.path, os.R_OK)
|
return os.access(path, os.R_OK)
|
||||||
|
|
||||||
def insert_note(self):
|
def insert_note(self):
|
||||||
"Add non-track row to playlist"
|
"Add non-track row to playlist"
|
||||||
@ -414,13 +414,14 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
self.music.play(self.current_track.path)
|
self.music.play(self.current_track.path)
|
||||||
|
|
||||||
# Update metadata
|
# Update metadata
|
||||||
|
# TODO is this valid if next track is on different playlist?
|
||||||
next_track_id = self.current_track_playlist_tab.play_started()
|
next_track_id = self.current_track_playlist_tab.play_started()
|
||||||
|
|
||||||
if next_track_id is not None:
|
if next_track_id is not None:
|
||||||
self.next_track = Tracks.get_track(session, next_track_id)
|
self.next_track = Tracks.get_track(session, next_track_id)
|
||||||
self.next_track_playlist_tab = self.current_track_playlist_tab
|
self.next_track_playlist_tab = self.current_track_playlist_tab
|
||||||
# Check we can read it
|
# Check we can read it
|
||||||
if not self.file_is_readable(self.next_track.path, os.R_OK):
|
if not self.file_is_readable(self.next_track.path):
|
||||||
self.show_warning(
|
self.show_warning(
|
||||||
"Can't read next track",
|
"Can't read next track",
|
||||||
self.next_track.path)
|
self.next_track.path)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user