Skip to content

Commit

Permalink
only update album event when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
yuygfgg committed Aug 5, 2024
1 parent b04ccdd commit b7f6397
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion musiclib.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ def scan_file(self, file_path):
self.add_event(event)
if album not in event.albums:
event.albums.append(album)
album.event = {'uuid': event.uuid, 'name': event.name}
if album.event is None:
album.event = {'uuid': event.uuid, 'name': event.name}

song = Song(song_name, album, song_artists, file_path, track_number, disc_number, year, song_art_path, event)
self.add_song(song)
Expand Down

0 comments on commit b7f6397

Please sign in to comment.