Change row to row_number
This commit is contained in:
parent
f96e02d9ae
commit
d609656ae3
@ -1014,13 +1014,13 @@ class PlaylistTab(QTableWidget):
|
||||
self._build_context_menu(item)
|
||||
self.menu.exec_(self.mapToGlobal(pos))
|
||||
|
||||
def _copy_path(self, row: int) -> None:
|
||||
def _copy_path(self, row_number: int) -> None:
|
||||
"""
|
||||
If passed row has a track, copy the track path, single-quoted,
|
||||
If passed row_number has a track, copy the track path, single-quoted,
|
||||
to the clipboard. Otherwise, return None.
|
||||
"""
|
||||
|
||||
track_path = self._get_row_track_path(row)
|
||||
track_path = self._get_row_track_path(row_number)
|
||||
if not track_path:
|
||||
return
|
||||
|
||||
@ -1103,16 +1103,16 @@ class PlaylistTab(QTableWidget):
|
||||
p.row_number for p in PlaylistRows.get_played_rows(
|
||||
session, self.playlist_id)
|
||||
]
|
||||
for row in range(starting_row, self.rowCount()):
|
||||
if row not in track_rows or row in played_rows:
|
||||
for row_number in range(starting_row, self.rowCount()):
|
||||
if row_number not in track_rows or row_number in played_rows:
|
||||
continue
|
||||
plr = self._get_row_plr(session, row)
|
||||
plr = self._get_row_plr(session, row_number)
|
||||
if not plr:
|
||||
continue
|
||||
if not file_is_readable(plr.track.path):
|
||||
continue
|
||||
else:
|
||||
return row
|
||||
return row_number
|
||||
|
||||
return None
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user