Skip to content

Commit

Permalink
used file object instead of self.filename
Browse files Browse the repository at this point in the history
  • Loading branch information
nullHawk committed Jan 16, 2024
1 parent 0c2db25 commit 94250ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion picard/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ def can_view_info(self):

def _info(self, metadata, file):
try:
metadata['~filesize'] = os.path.getsize(encode_filename(self.filename))
metadata['~filesize'] = os.path.getsize(encode_filename(file.filename))
except BaseException:
pass
if hasattr(file.info, 'length'):
Expand Down
1 change: 1 addition & 0 deletions test/formats/test_wav.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
'~channels': '2',
'~sample_rate': '44100',
'~bits_per_sample': '16',
'~filesize': '14652',
}

if WAVFile.supports_tag('artist'):
Expand Down

0 comments on commit 94250ff

Please sign in to comment.