add yt-dlp version on web
This commit is contained in:
@@ -12,6 +12,7 @@ import json
|
||||
import pathlib
|
||||
|
||||
from ytdl import DownloadQueueNotifier, DownloadQueue
|
||||
from yt_dlp.version import __version__ as yt_dlp_version
|
||||
|
||||
log = logging.getLogger('main')
|
||||
|
||||
@@ -231,6 +232,10 @@ def robots(request):
|
||||
)
|
||||
return response
|
||||
|
||||
@routes.get(config.URL_PREFIX + 'version')
|
||||
def version(request):
|
||||
return web.json_response({"version": yt_dlp_version})
|
||||
|
||||
if config.URL_PREFIX != '/':
|
||||
@routes.get('/')
|
||||
def index_redirect_root(request):
|
||||
|
||||
Reference in New Issue
Block a user