Compare commits

..

No commits in common. "fc9a10ad5270c119c56da366234167ebf5290202" and "c7f7f25af064f388d8385316518c888612c15947" have entirely different histories.

2 changed files with 4 additions and 2 deletions

View File

@ -342,10 +342,12 @@ class Playlists(Base):
DEBUG(f"Playlist.remove_track({self.id=}, {row=})") DEBUG(f"Playlist.remove_track({self.id=}, {row=})")
# Get tracks collection for this playlist # Get tracks collection for this playlist
tracks_collections = self.tracks
# Tracks are a dictionary of tracks keyed on row # Tracks are a dictionary of tracks keyed on row
# number. Remove the relevant row. # number. Remove the relevant row.
del self.tracks[row] del tracks_collections[row]
# Save the new tracks collection # Save the new tracks collection
self.tracks = tracks_collections
session.flush() session.flush()

View File

@ -224,7 +224,7 @@ def update_db(session):
for path in list(os_paths - db_paths): for path in list(os_paths - db_paths):
DEBUG(f"utilities.update_db: {path=} not in database") DEBUG(f"utilities.update_db: {path=} not in database")
# is filename in database with a different path? # is filename in database?
track = Tracks.get_by_filename(session, os.path.basename(path)) track = Tracks.get_by_filename(session, os.path.basename(path))
if not track: if not track:
messages.append(f"{path} missing from database: {path}") messages.append(f"{path} missing from database: {path}")