Compare commits
2 Commits
c7f7f25af0
...
fc9a10ad52
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc9a10ad52 | ||
|
|
8b644ee236 |
@ -342,12 +342,10 @@ class Playlists(Base):
|
||||
DEBUG(f"Playlist.remove_track({self.id=}, {row=})")
|
||||
|
||||
# Get tracks collection for this playlist
|
||||
tracks_collections = self.tracks
|
||||
# Tracks are a dictionary of tracks keyed on row
|
||||
# number. Remove the relevant row.
|
||||
del tracks_collections[row]
|
||||
del self.tracks[row]
|
||||
# Save the new tracks collection
|
||||
self.tracks = tracks_collections
|
||||
session.flush()
|
||||
|
||||
|
||||
|
||||
@ -224,7 +224,7 @@ def update_db(session):
|
||||
|
||||
for path in list(os_paths - db_paths):
|
||||
DEBUG(f"utilities.update_db: {path=} not in database")
|
||||
# is filename in database?
|
||||
# is filename in database with a different path?
|
||||
track = Tracks.get_by_filename(session, os.path.basename(path))
|
||||
if not track:
|
||||
messages.append(f"{path} missing from database: {path}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user