mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-09 19:52:16 +00:00
Display version and proper URL on web UI
This commit is contained in:
parent
98ff73738d
commit
c3f911b3f4
@ -1,7 +1,7 @@
|
||||
# This file is part of Supysonic.
|
||||
# Supysonic is a Python implementation of the Subsonic server API.
|
||||
#
|
||||
# Copyright (C) 2013-2019 Alban 'spl0k' Féron
|
||||
# Copyright (C) 2013-2021 Alban 'spl0k' Féron
|
||||
# 2017 Óscar García Amor
|
||||
#
|
||||
# Distributed under terms of the GNU AGPLv3 license.
|
||||
@ -19,6 +19,7 @@ from flask import Blueprint
|
||||
from functools import wraps
|
||||
from pony.orm import ObjectNotFound
|
||||
|
||||
from .. import VERSION, DOWNLOAD_URL
|
||||
from ..daemon.client import DaemonClient
|
||||
from ..daemon.exceptions import DaemonUnavailableError
|
||||
from ..db import Artist, Album, Track
|
||||
@ -27,6 +28,11 @@ from ..managers.user import UserManager
|
||||
frontend = Blueprint("frontend", __name__)
|
||||
|
||||
|
||||
@frontend.context_processor
|
||||
def inject_metadata():
|
||||
return {"version": VERSION, "download_url": DOWNLOAD_URL}
|
||||
|
||||
|
||||
@frontend.before_request
|
||||
def login_check():
|
||||
request.user = None
|
||||
|
@ -2,7 +2,7 @@
|
||||
This file is part of Supysonic.
|
||||
Supysonic is a Python implementation of the Subsonic server API.
|
||||
|
||||
Copyright (C) 2013-2018 Alban 'spl0k' Féron
|
||||
Copyright (C) 2013-2021 Alban 'spl0k' Féron
|
||||
2017 Óscar García Amor
|
||||
|
||||
Distributed under terms of the GNU AGPLv3 license.
|
||||
@ -86,10 +86,10 @@
|
||||
|
||||
<hr />
|
||||
<footer>
|
||||
<p>Supysonic <a href="https://github.com/spl0k/supysonic">source
|
||||
code</a> is available under the <a
|
||||
href="http://www.gnu.org/licenses/agpl-3.0.html">GNU
|
||||
Affero General Public License version 3</a>.</p>
|
||||
<p>Supysonic version {{ version }}. Its
|
||||
<a href="{{ download_url }}/tree/{{ version }}">source code</a> is available
|
||||
under the <a href="http://www.gnu.org/licenses/agpl-3.0.html">GNU Affero
|
||||
General Public License version 3</a>.</p>
|
||||
</footer>
|
||||
</div> <!-- /container -->
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user