Skip to content

Commit

Permalink
disable SystemMediaTransportControls
Browse files Browse the repository at this point in the history
  • Loading branch information
elibroftw committed Apr 19, 2024
1 parent 42d1a22 commit e41e769
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Music Caster by Elijah Lopez Changelog

5.19.1
- [Fix] Windows-specific issues

5.19.0
- [Feat] Update from GUI

Expand Down
8 changes: 4 additions & 4 deletions build_files/mc_version_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# For more details about fixed file info 'ffi' see: http://msdn.microsoft.com/en-us/library/ms646997.aspx
VSVersionInfo(
ffi=FixedFileInfo(
prodvers=(5, 19, 0, 0),
filevers=(5, 19, 0, 0),
prodvers=(5, 19, 1, 0),
filevers=(5, 19, 1, 0),
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x17,
# Contains a bitmask that specifies the Boolean attributes of the file.
Expand All @@ -27,12 +27,12 @@ VSVersionInfo(
'000004b0',
[StringStruct('CompanyName', 'Elijah Lopez'),
StringStruct('FileDescription', 'Music Caster'),
StringStruct('FileVersion', '5.19.0.0'),
StringStruct('FileVersion', '5.19.1.0'),
StringStruct('InternalName', 'Music Caster'),
StringStruct('LegalCopyright', 'Copyright (c) 2019 - 2024, Elijah Lopez'),
StringStruct('OriginalFilename', 'Music Caster.exe'),
StringStruct('ProductName', 'Music Caster'),
StringStruct('ProductVersion', '5.19.0.0')])
StringStruct('ProductVersion', '5.19.1.0')])
]),
VarFileInfo([VarStruct('Translation', [0, 1200])])
]
Expand Down
2 changes: 1 addition & 1 deletion build_files/setup_script.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MyAppName "Music Caster"
#define MyAppVersion "5.19.0"
#define MyAppVersion "5.19.1"
#define MyAppPublisher "Elijah Lopez"
#define MyAppURL "https://elijahlopez.ca/software#music-caster"
#define MyAppExeName "Music Caster.exe"
Expand Down
2 changes: 1 addition & 1 deletion src/meta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = latest_version = '5.19.0'
VERSION = latest_version = '5.19.1'
UPDATE_MESSAGE = """
[NEW] Better Error Capturing
[MSG] Language translators wanted
Expand Down
12 changes: 6 additions & 6 deletions src/music_caster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1473,10 +1473,10 @@ def after_play(title, artists: str, album, autoplay, switching_device):
# artists is comma separated string
tray_notify(t('Playing') + f': {get_first_artist(artists)} - {title}')
playing_status.play()
system_media_controls.set_playing()
# system_media_controls.set_playing()
else:
playing_status.pause()
system_media_controls.set_paused()
# system_media_controls.set_paused()
refresh_tray()
save_queues()
DiscordPresence.update(settings['discord_rpc'], state=t('By') + f': {artists}', details=title,
Expand All @@ -1495,8 +1495,8 @@ def after_play(title, artists: str, album, autoplay, switching_device):
album_art: Image.Image = Image.open(img_data)
thumb_path = Path('thumb.jpg').absolute()
album_art.save(thumb_path)
system_media_controls.set_metadata(title, artists, album, thumb_path.as_uri())
system_media_controls.update_time()
# system_media_controls.set_metadata(title, artists, album, thumb_path.as_uri())
# system_media_controls.update_time()

if not gui_window.was_closed():
gui_window.metadata['update_listboxes'] = True
Expand Down Expand Up @@ -2260,7 +2260,7 @@ def stop(stopped_from: str, stop_cast=True):
app_log.info(f'stopped from {stopped_from}, stop_cast={stop_cast}')
# allow Windows to go to sleep
if platform.system() == 'Windows':
system_media_controls.set_stopped()
# system_media_controls.set_stopped()
ctypes.windll.kernel32.SetThreadExecutionState(0x80000000)
playing_status.stop()
sar.alive = playing_url = False
Expand Down Expand Up @@ -3893,7 +3893,7 @@ def handle_action(action):
except Exception as exception:
tray_notify(t('WARNING: Failed to start audio player. Do not play on local device.'))
handle_exception(exception)
system_media_controls = SystemMediaControls(on_smtc_btn_press)
# system_media_controls = SystemMediaControls(on_smtc_btn_press)
# find a port to bind to
socket_timeout = 0.5 if args.shell else 0.1
while True:
Expand Down

0 comments on commit e41e769

Please sign in to comment.