diff --git a/.github/workflows/pyinstaller-windows.yml b/.github/workflows/pyinstaller-windows.yml index 446bdd6..3ac68bc 100644 --- a/.github/workflows/pyinstaller-windows.yml +++ b/.github/workflows/pyinstaller-windows.yml @@ -16,6 +16,12 @@ jobs: with: python-version: '3.12' - run: pip install pyinstaller-versionfile + - name: Install UPX + uses: crazy-max/ghaction-upx@v3 + with: + install-only: true + - name: Check UPX version + run: upx --version - name: Create version.txt for PyInstaller working-directory: ./src run: create-version-file version.yml --outfile version.txt diff --git a/src/main.py b/src/main.py index 18fceab..5ae1fc2 100644 --- a/src/main.py +++ b/src/main.py @@ -15,7 +15,7 @@ from pypresence import DiscordNotFound, PipeClosed, Presence from win32api import GetFileVersionInfo, HIWORD, LOWORD -__version__ = '0.3.1' +__version__ = '0.3.2' logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) @@ -255,15 +255,15 @@ def update(): try: RPC.update(pid=pid, state=f"{song_info['artist']} | {song_info['album']}", - details = song_info['title'].center(2), - large_image = song_info['cover'], - large_text = song_info['album'].center(2), - small_image = 'play' if status != Status.paused else 'pause', - small_text = 'Playing' if status != Status.paused else 'Paused', - start = int(time.time() - current_float) + details=song_info['title'].center(2), + large_image=song_info['cover'], + large_text=song_info['album'].center(2), + small_image='play' if status != Status.paused else 'pause', + small_text='Playing' if status != Status.paused else 'Paused', + start=int(time.time() - current_float) if status != Status.paused else None, - buttons = [{'label': 'Listen on Netease', - 'url': f'https://music.163.com/#/song?id={song_id}'}] + buttons=[{'label': 'Listen on Netease', + 'url': f'https://music.163.com/#/song?id={song_id}'}] ) except PipeClosed: logger.info('Reconnecting to Discord...') diff --git a/src/main.spec b/src/main.spec index f27ceb3..2a489d3 100644 --- a/src/main.spec +++ b/src/main.spec @@ -42,5 +42,5 @@ exe = EXE( entitlements_file=None, version='version.txt', uac_admin=True, - uac_uiaccess=True, + uac_uiaccess=False, ) diff --git a/src/version.yml b/src/version.yml index b08d5e3..7a954cc 100644 --- a/src/version.yml +++ b/src/version.yml @@ -1,4 +1,4 @@ -Version: 0.3.1.0 +Version: 0.3.2.0 CompanyName: aliencaocao FileDescription: Netease Cloudmusic Discord RPC InternalName: Netease Cloudmusic Discord RPC