Skip to content

Commit d0f9eb6

Browse files
committed
Add a place to log version on each run
1 parent 63e305a commit d0f9eb6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

spotiplex/config.py

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Config:
1313
"""Generic Config class to pull environment vars."""
1414

1515
if os.environ.get("DOCKER"):
16+
SPOTIPLEX_VERSION = os.environ.get("COMMIT_SHA")
1617
SPOTIFY_API_KEY = os.environ.get("SPOTIFY_API_KEY")
1718
SPOTIFY_API_ID = os.environ.get("SPOTIFY_API_ID")
1819

spotiplex/main.py

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import spotiplex.modules.confighandler.main as config_handler
99
import spotiplex.modules.spotiplex.main as sp_module
10+
from spotiplex.config import Config
1011

1112
logger.trace("Initializing logger...")
1213
logger.remove()
@@ -20,6 +21,7 @@
2021
@app.command()
2122
def sync_lidarr_imports() -> None:
2223
"""Syncs all playlists currently being pulled via Lidarr."""
24+
logger.debug("We are running on commit: ", Config.SPOTIPLEX_VERSION)
2325
sp_instance = sp_module.Spotiplex(lidarr=True, playlist_id=None)
2426
sp_instance.run()
2527

@@ -34,6 +36,7 @@ def generate_env() -> None:
3436
@app.command()
3537
def sync_manual_lists() -> None:
3638
"""Syncs all playlists specified in config file."""
39+
logger.debug("We are running on commit: ", Config.SPOTIPLEX_VERSION)
3740
sp_instance = sp_module.Spotiplex(lidarr=False, playlist_id=None)
3841
sp_instance.run()
3942

0 commit comments

Comments
 (0)