Compare commits
No commits in common. "4687ef528841701a4b621dca51a5c70b6bdbf31a" and "976beade8514a435408b17251766be14741ca47b" have entirely different histories.
4687ef5288
...
976beade85
@ -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(path, os.R_OK)
|
return os.access(self.next_track.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,14 +414,13 @@ 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):
|
if not self.file_is_readable(self.next_track.path, os.R_OK):
|
||||||
self.show_warning(
|
self.show_warning(
|
||||||
"Can't read next track",
|
"Can't read next track",
|
||||||
self.next_track.path)
|
self.next_track.path)
|
||||||
|
|||||||
@ -622,11 +622,9 @@ class PlaylistTab(QTableWidget):
|
|||||||
txt = f"Track not found (track.id={id})"
|
txt = f"Track not found (track.id={id})"
|
||||||
else:
|
else:
|
||||||
txt = f"""
|
txt = f"""
|
||||||
Title: {track.title}
|
Title: {track.title}\n
|
||||||
Artist: {track.artist}
|
Artist: {track.artist}\n
|
||||||
Path: {track.path}
|
Path: {track.path}"""
|
||||||
Track ID: {track.id}
|
|
||||||
"""
|
|
||||||
info = QMessageBox(self)
|
info = QMessageBox(self)
|
||||||
info.setIcon(QMessageBox.Information)
|
info.setIcon(QMessageBox.Information)
|
||||||
info.setText(txt)
|
info.setText(txt)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user