Skip to content

Commit

Permalink
add_file(): ensure track_will_expand is defined
Browse files Browse the repository at this point in the history
That's a potential bug, but conditions for it to happen are very rare.

Method is only called from https://github.com/metabrainz/picard/blob/9eda85bf3a18612d05204894dea7d9d4166ae69b/picard/file.py#L653
 and it only runs if the parent actually changed
  • Loading branch information
zas committed Apr 5, 2024
1 parent 05ceb63 commit f2b2f90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions picard/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def linked_files(self):
return self.files

def add_file(self, file, new_album=True):
track_will_expand = False
if file not in self.files:
track_will_expand = self.num_linked_files == 1
if not self.files: # The track uses original metadata from the file only
Expand Down

0 comments on commit f2b2f90

Please sign in to comment.