fix: Add last played spotify song when none currently playing
All checks were successful
Check Code Quality / RuffCheck (push) Successful in 2m39s
Build Docker / BuildImage (push) Successful in 4m23s

This commit is contained in:
2026-01-28 21:50:15 +07:00
parent d53c48ba85
commit 779f895ef8
4 changed files with 37 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ from mail import sendEmail
from tools import getClientIP, getGitCommit, json_response, parse_date, get_tools_data
from blueprints import sol
from dateutil import parser as date_parser
from blueprints.spotify import get_spotify_track
from blueprints.spotify import get_playing_spotify_track
from cache_helper import get_nc_config, get_git_latest_activity
# Constants
@@ -176,7 +176,7 @@ def tools():
@app.route("/playing")
def playing():
"""Get the currently playing Spotify track."""
track_info = get_spotify_track()
track_info = get_playing_spotify_track()
if "error" in track_info:
return json_response(request, track_info, HTTP_OK)
return json_response(request, {"spotify": track_info}, HTTP_OK)