mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 17:06:17 +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.
|
# This file is part of Supysonic.
|
||||||
# Supysonic is a Python implementation of the Subsonic server API.
|
# 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
|
# 2017 Óscar García Amor
|
||||||
#
|
#
|
||||||
# Distributed under terms of the GNU AGPLv3 license.
|
# Distributed under terms of the GNU AGPLv3 license.
|
||||||
@ -19,6 +19,7 @@ from flask import Blueprint
|
|||||||
from functools import wraps
|
from functools import wraps
|
||||||
from pony.orm import ObjectNotFound
|
from pony.orm import ObjectNotFound
|
||||||
|
|
||||||
|
from .. import VERSION, DOWNLOAD_URL
|
||||||
from ..daemon.client import DaemonClient
|
from ..daemon.client import DaemonClient
|
||||||
from ..daemon.exceptions import DaemonUnavailableError
|
from ..daemon.exceptions import DaemonUnavailableError
|
||||||
from ..db import Artist, Album, Track
|
from ..db import Artist, Album, Track
|
||||||
@ -27,6 +28,11 @@ from ..managers.user import UserManager
|
|||||||
frontend = Blueprint("frontend", __name__)
|
frontend = Blueprint("frontend", __name__)
|
||||||
|
|
||||||
|
|
||||||
|
@frontend.context_processor
|
||||||
|
def inject_metadata():
|
||||||
|
return {"version": VERSION, "download_url": DOWNLOAD_URL}
|
||||||
|
|
||||||
|
|
||||||
@frontend.before_request
|
@frontend.before_request
|
||||||
def login_check():
|
def login_check():
|
||||||
request.user = None
|
request.user = None
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
This file is part of Supysonic.
|
This file is part of Supysonic.
|
||||||
Supysonic is a Python implementation of the Subsonic server API.
|
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
|
2017 Óscar García Amor
|
||||||
|
|
||||||
Distributed under terms of the GNU AGPLv3 license.
|
Distributed under terms of the GNU AGPLv3 license.
|
||||||
@ -86,10 +86,10 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<footer>
|
<footer>
|
||||||
<p>Supysonic <a href="https://github.com/spl0k/supysonic">source
|
<p>Supysonic version {{ version }}. Its
|
||||||
code</a> is available under the <a
|
<a href="{{ download_url }}/tree/{{ version }}">source code</a> is available
|
||||||
href="http://www.gnu.org/licenses/agpl-3.0.html">GNU
|
under the <a href="http://www.gnu.org/licenses/agpl-3.0.html">GNU Affero
|
||||||
Affero General Public License version 3</a>.</p>
|
General Public License version 3</a>.</p>
|
||||||
</footer>
|
</footer>
|
||||||
</div> <!-- /container -->
|
</div> <!-- /container -->
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user