Skip to content

Commit 91c40ee

Browse files
committed
improve installer, podcast support
1 parent 3e7b024 commit 91c40ee

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

InnoScript.iss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ english.AdditionalTasks=Additional tasks
3535
russian.RunDescription=Запустить YandexMusicRPC
3636
russian.CreateDesktop=Создать значок на рабочем столе
3737
russian.AdditionalTasks=Дополнительные задачи
38+
english.InstallationTitle=Installation of YandexMusicRPC
39+
english.UpdateTitle=Update of YandexMusicRPC
40+
english.UpdateMSG=Please ensure that the application is closed before starting the update to avoid potential errors.
41+
russian.InstallationTitle=Установка YandexMusicRPC
42+
russian.UpdateTitle=Обновление YandexMusicRPC
43+
russian.UpdateMSG=Пожалуйста, убедитесь что приложение закрыто перед началом обновления, чтобы избежать возможных ошибок.
3844

3945
[Files]
4046
Source: "dist\YandexMusicRPC-cli\YandexMusicRPC.exe"; DestDir: "{pf}\YandexMusicRPC"; Flags: ignoreversion
@@ -45,6 +51,22 @@ Name: "{group}\YandexMusicRPC"; Filename: "{pf}\YandexMusicRPC\YandexMusicRPC.ex
4551
Name: "{autodesktop}\YandexMusicRPC"; Filename: "{pf}\YandexMusicRPC\YandexMusicRPC.exe"; Tasks: desktopicon
4652

4753
[Code]
54+
function IsAppInstalled: Boolean;
55+
var
56+
InstallPath: string;
57+
begin
58+
Result := RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\YandexMusicRPC_is1', 'InstallLocation', InstallPath);
59+
end;
60+
61+
procedure InitializeWizard;
62+
begin
63+
if IsAppInstalled then
64+
MsgBox('The same version of YandexMusicRPC is already installed. Update is not required.', mbInformation, MB_OK);
65+
WizardForm.Caption := CustomMessage('UpdateTitle')
66+
else
67+
WizardForm.Caption := CustomMessage('InstallationTitle');
68+
end;
69+
4870
procedure DeleteStartupShortcut;
4971
var
5072
StartupShortcut: string;

main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,13 @@ def update_presence(ongoing_track, current_time=0, paused=False):
448448
presence_args = {
449449
'activity_type': 2,
450450
'details': ongoing_track['title'],
451-
'state': ongoing_track['artist'],
451+
452452
'large_image': ongoing_track['og-image'],
453453
'small_image': "https://github.com/FozerG/YandexMusicRPC/blob/main/assets/Paused.png?raw=true" if paused else "https://github.com/FozerG/YandexMusicRPC/blob/main/assets/Playing.png?raw=true",
454454
'small_text': paused_text if paused else playing_text
455455
}
456+
if ongoing_track['artist']:
457+
presence_args['state'] = ongoing_track['artist']
456458

457459
if ongoing_track['album'] != ongoing_track['title']:
458460
presence_args['large_text'] = ongoing_track['album']

0 commit comments

Comments
 (0)