Added overview for album-free tracks

This commit is contained in:
krateng 2023-10-16 13:57:28 +02:00
parent 6434405f1c
commit 40b4a8c919
7 changed files with 42 additions and 3 deletions

View File

@ -2,6 +2,7 @@ minor_release_name: "Nicole"
3.2.0:
notes:
- "[Architecture] Switched to linuxserver.io container base image"
- "[Architecture] Reworked image handling"
- "[Feature] Added basic support for albums"
- "[Feature] New start page"
- "[Feature] Added UI for track-artist, track-album and album-artist association"
@ -10,3 +11,4 @@ minor_release_name: "Nicole"
- "[Bugfix] Fixed search on manual scrobble page"
- "[Bugfix] Disabled DB maintenance while not running main server"
- "[Bugfix] Removed some nonsensical ephemereal database entry creations"
- "[Bugfix] Fixed API endpoint for track charts with no artist provided"

View File

@ -363,6 +363,9 @@ def get_albums_artist_appears_on(dbconn=None,**keys):
return result
@waitfordb
def get_tracks_without_album(dbconn=None,resolve_ids=True):
return get_charts_tracks(album=None,timerange=alltime(),resolve_ids=resolve_ids,dbconn=dbconn)
@waitfordb
def get_charts_artists(dbconn=None,resolve_ids=True,**keys):

View File

@ -134,7 +134,7 @@ else:
def serialize(obj):
try:
return serialize(obj.hashable())
except Exception:
except AttributeError:
try:
return json.dumps(obj)
except Exception:

View File

@ -1108,7 +1108,7 @@ def count_scrobbles_by_track_of_artist(since,to,artist,resolve_ids=True,dbconn=N
@connection_provider
def count_scrobbles_by_track_of_album(since,to,album,resolve_ids=True,dbconn=None):
album_id = get_album_id(album,dbconn=dbconn)
album_id = get_album_id(album,dbconn=dbconn) if album else None
jointable = sql.join(
DB['scrobbles'],

View File

@ -21,7 +21,8 @@
['setup','Server Setup'],
['settings','Settings'],
['apikeys','API Keys'],
['manual','Manual Scrobbling']
['manual','Manual Scrobbling'],
['albumless','Tracks without Albums']
] %}
{# ['import','Scrobble Import'],

View File

@ -0,0 +1,12 @@
{% set page ='admin_albumless' %}
{% extends "abstracts/admin.jinja" %}
{% block title %}Maloja - Albumless Tracks{% endblock %}
{% block maincontent %}
Here you can find tracks that currently have no album.<br/><br/>
{% with list = dbc.get_tracks_without_album() %}
{% include 'partials/list_tracks.jinja' %}
{% endwith %}
{% endblock %}

View File

@ -0,0 +1,21 @@
{% import 'snippets/links.jinja' as links %}
{% import 'snippets/entityrow.jinja' as entityrow %}
{% set firstindex = amountkeys.page * amountkeys.perpage %}
{% set lastindex = firstindex + amountkeys.perpage %}
<table class='list'>
{% for e in list %}
{% if loop.index0 >= firstindex and loop.index0 < lastindex %}
<tr>
<!-- artist -->
{{ entityrow.row(e['track']) }}
</tr>
{% endif %}
{% endfor %}
</table>