mirror of
https://github.com/krateng/maloja.git
synced 2025-07-09 03:04:07 -04:00
Added overview for album-free tracks
This commit is contained in:
parent
6434405f1c
commit
40b4a8c919
@ -2,6 +2,7 @@ minor_release_name: "Nicole"
|
|||||||
3.2.0:
|
3.2.0:
|
||||||
notes:
|
notes:
|
||||||
- "[Architecture] Switched to linuxserver.io container base image"
|
- "[Architecture] Switched to linuxserver.io container base image"
|
||||||
|
- "[Architecture] Reworked image handling"
|
||||||
- "[Feature] Added basic support for albums"
|
- "[Feature] Added basic support for albums"
|
||||||
- "[Feature] New start page"
|
- "[Feature] New start page"
|
||||||
- "[Feature] Added UI for track-artist, track-album and album-artist association"
|
- "[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] Fixed search on manual scrobble page"
|
||||||
- "[Bugfix] Disabled DB maintenance while not running main server"
|
- "[Bugfix] Disabled DB maintenance while not running main server"
|
||||||
- "[Bugfix] Removed some nonsensical ephemereal database entry creations"
|
- "[Bugfix] Removed some nonsensical ephemereal database entry creations"
|
||||||
|
- "[Bugfix] Fixed API endpoint for track charts with no artist provided"
|
||||||
|
@ -363,6 +363,9 @@ def get_albums_artist_appears_on(dbconn=None,**keys):
|
|||||||
|
|
||||||
return result
|
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
|
@waitfordb
|
||||||
def get_charts_artists(dbconn=None,resolve_ids=True,**keys):
|
def get_charts_artists(dbconn=None,resolve_ids=True,**keys):
|
||||||
|
@ -134,7 +134,7 @@ else:
|
|||||||
def serialize(obj):
|
def serialize(obj):
|
||||||
try:
|
try:
|
||||||
return serialize(obj.hashable())
|
return serialize(obj.hashable())
|
||||||
except Exception:
|
except AttributeError:
|
||||||
try:
|
try:
|
||||||
return json.dumps(obj)
|
return json.dumps(obj)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
@ -1108,7 +1108,7 @@ def count_scrobbles_by_track_of_artist(since,to,artist,resolve_ids=True,dbconn=N
|
|||||||
@connection_provider
|
@connection_provider
|
||||||
def count_scrobbles_by_track_of_album(since,to,album,resolve_ids=True,dbconn=None):
|
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(
|
jointable = sql.join(
|
||||||
DB['scrobbles'],
|
DB['scrobbles'],
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
['setup','Server Setup'],
|
['setup','Server Setup'],
|
||||||
['settings','Settings'],
|
['settings','Settings'],
|
||||||
['apikeys','API Keys'],
|
['apikeys','API Keys'],
|
||||||
['manual','Manual Scrobbling']
|
['manual','Manual Scrobbling'],
|
||||||
|
['albumless','Tracks without Albums']
|
||||||
|
|
||||||
] %}
|
] %}
|
||||||
{# ['import','Scrobble Import'],
|
{# ['import','Scrobble Import'],
|
||||||
|
12
maloja/web/jinja/admin_albumless.jinja
Normal file
12
maloja/web/jinja/admin_albumless.jinja
Normal 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 %}
|
21
maloja/web/jinja/partials/list_tracks.jinja
Normal file
21
maloja/web/jinja/partials/list_tracks.jinja
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user