diff --git a/.gitignore b/.gitignore index f4d99cb..3de290f 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,5 @@ build client .gitignore -logs.txt \ No newline at end of file +logs.txt +*.spec \ No newline at end of file diff --git a/app/arg_handler.py b/app/arg_handler.py index ab8718f..1e1c00a 100644 --- a/app/arg_handler.py +++ b/app/arg_handler.py @@ -66,7 +66,7 @@ class HandleArgs: f"--add-data=assets{_s}assets", f"--add-data=client{_s}client", f"--add-data=runtime.config.ini{_s}.", - f"--icon=../assets/logo-fill.ico", + f"--icon=assets/logo-fill.ico", "-y", ] ) diff --git a/app/models/track.py b/app/models/track.py index b7e8b2e..2b6ba4c 100644 --- a/app/models/track.py +++ b/app/models/track.py @@ -52,6 +52,7 @@ class Track: self.og_title = self.title self.og_album = self.album self.last_mod = int(self.last_mod) + self.date = int(self.date) if self.artists is not None: artists = split_artists(self.artists) diff --git a/app/setup/files.py b/app/setup/files.py index 9a770bd..0fc2741 100644 --- a/app/setup/files.py +++ b/app/setup/files.py @@ -15,13 +15,11 @@ config = ConfigParser() config_path = get_home_res_path("runtime.config.ini") config.read(config_path) -try: - IS_BUILD = config["DEFAULT"]["BUILD"] == "True" - settings.Keys.LASTFM_API = config["DEFAULT"]["LASTFM_API_KEY"] -except KeyError: - # If the key doesn't exist, the app is in dev mode. - IS_BUILD = False +IS_BUILD = config["DEFAULT"]["BUILD"] == "True" + +if IS_BUILD: + settings.Keys.LASTFM_API = config["DEFAULT"]["LASTFM_API_KEY"] class CopyFiles: """Copies assets to the app directory.""" diff --git a/swingmusic.spec b/swingmusic.spec deleted file mode 100644 index dc7d42d..0000000 --- a/swingmusic.spec +++ /dev/null @@ -1,45 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - - -block_cipher = None - - -a = Analysis( - ['manage.py'], - pathex=[], - binaries=[], - datas=[('assets', 'assets'), ('client', 'client'), ('runtime.config.ini', '.')], - hiddenimports=[], - hookspath=[], - hooksconfig={}, - runtime_hooks=[], - excludes=[], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher, - noarchive=False, -) -pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) - -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - [], - name='swingmusic', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=True, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, - icon=['../assets/logo-fill.ico'], -)