Skip to content

Commit

Permalink
Fix album not found
Browse files Browse the repository at this point in the history
  • Loading branch information
elibroftw committed Apr 18, 2024
1 parent 1c5ac34 commit d911191
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/modules/win32_media_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def set_metadata(self, title, artist, album, thumb_uri: str):
_updater.type = media.MediaPlaybackType.MUSIC
_updater.music_properties.artist = artist
_updater.music_properties.title = title
_updater.music_properties.album_title = album
if album is not None:
_updater.music_properties.album_title = album
import winrt.windows.storage.streams as streams
assert isinstance(thumb_uri, str)
assert thumb_uri.count('://', 1)
Expand Down
2 changes: 1 addition & 1 deletion src/music_caster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,7 @@ def play(position=0, autoplay=True, switching_device=False, show_error=False, fr
track_start = time.monotonic() - track_position
track_end = track_start + track_length
LAST_PLAYED = time.time()
return after_play(metadata['title'], metadata['artist'], metadata['album'], autoplay, switching_device)
return after_play(metadata['title'], metadata['artist'], metadata.get('album'), autoplay, switching_device)


def metadata_key(filename, album_sort=True):
Expand Down

0 comments on commit d911191

Please sign in to comment.