diff --git a/app/musicmuster.py b/app/musicmuster.py index b8e48b0..efb264c 100755 --- a/app/musicmuster.py +++ b/app/musicmuster.py @@ -381,11 +381,6 @@ class Window(QMainWindow, Ui_MainWindow): self.previous_track_position = self.music.fade() self.end_of_track_actions() - def file_is_readable(self, path): - "Return True if path is readable else False" - - return os.access(path, os.R_OK) - def insert_note(self): "Add non-track row to playlist" diff --git a/app/playlists.py b/app/playlists.py index 6b99de5..9942ac1 100644 --- a/app/playlists.py +++ b/app/playlists.py @@ -609,11 +609,6 @@ class PlaylistTab(QTableWidget): duration = Tracks.get_duration(session, self._get_row_id(row)) return start + timedelta(milliseconds=duration) - def _can_read_track(self, track): - "Check track file is readable" - - return os.access(track.path, os.R_OK) - def _context_menu(self, pos): self.menu.exec_(self.mapToGlobal(pos)) @@ -1289,10 +1284,20 @@ class PlaylistTab(QTableWidget): self.setItem(row, self.COL_START_TIME, item) def _track_path_is_readable(self, track_id): - "Returns True if track path is readable, else False" + """ + Returns True if track path is readable, else False + + vlc cannot read files with a colon in the path + """ with Session() as session: - return os.access(Tracks.get_path(session, track_id), os.R_OK) + path = Tracks.get_path(session, track_id) + + if os.access(path, os.R_OK): + if ':' not in path: + return True + + return False def _update_row(self, row, track): """