mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-25 01:02:19 +00:00
Use absolute path for DB in menu template
This commit is contained in:
parent
4a6c2e8e23
commit
b9b0ba0a0e
2 changed files with 8 additions and 10 deletions
12
bazarr.py
12
bazarr.py
|
@ -143,7 +143,7 @@ def series():
|
|||
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")
|
||||
languages = c.fetchall()
|
||||
c.close()
|
||||
output = template('series', bazarr_version=bazarr_version, rows=data, languages=languages, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url)
|
||||
output = template('series', __file__=__file__, bazarr_version=bazarr_version, rows=data, languages=languages, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url)
|
||||
return output
|
||||
|
||||
@route(base_url + 'series_json/<query>', method='GET')
|
||||
|
@ -211,7 +211,7 @@ def episodes(no):
|
|||
for key,season in itertools.groupby(episodes,operator.itemgetter(2)):
|
||||
seasons_list.append(list(season))
|
||||
|
||||
return template('episodes', bazarr_version=bazarr_version, no=no, details=series_details, seasons=seasons_list, url_sonarr_short=url_sonarr_short, base_url=base_url, tvdbid=tvdbid)
|
||||
return template('episodes', __file__=__file__, bazarr_version=bazarr_version, no=no, details=series_details, seasons=seasons_list, url_sonarr_short=url_sonarr_short, base_url=base_url, tvdbid=tvdbid)
|
||||
|
||||
@route(base_url + 'scan_disk/<no:int>', method='GET')
|
||||
def scan_disk(no):
|
||||
|
@ -247,7 +247,7 @@ def history():
|
|||
data = c.fetchall()
|
||||
c.close()
|
||||
data = reversed(sorted(data, key=operator.itemgetter(4)))
|
||||
return template('history', bazarr_version=bazarr_version, rows=data, row_count=row_count, page=page, max_page=max_page, base_url=base_url)
|
||||
return template('history', __file__=__file__, bazarr_version=bazarr_version, rows=data, row_count=row_count, page=page, max_page=max_page, base_url=base_url)
|
||||
|
||||
@route(base_url + 'wanted')
|
||||
def wanted():
|
||||
|
@ -267,7 +267,7 @@ def wanted():
|
|||
c.execute("SELECT table_shows.title, table_episodes.season || 'x' || table_episodes.episode, table_episodes.title, table_episodes.missing_subtitles, table_episodes.sonarrSeriesId, path_substitution(table_episodes.path), table_shows.hearing_impaired, table_episodes.sonarrEpisodeId FROM table_episodes INNER JOIN table_shows on table_shows.sonarrSeriesId = table_episodes.sonarrSeriesId WHERE table_episodes.missing_subtitles != '[]' ORDER BY table_episodes._rowid_ DESC LIMIT 15 OFFSET ?", (offset,))
|
||||
data = c.fetchall()
|
||||
c.close()
|
||||
return template('wanted', bazarr_version=bazarr_version, rows=data, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url)
|
||||
return template('wanted', __file__=__file__, bazarr_version=bazarr_version, rows=data, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url)
|
||||
|
||||
@route(base_url + 'wanted_search_missing_subtitles')
|
||||
def wanted_search_missing_subtitles_list():
|
||||
|
@ -290,7 +290,7 @@ def settings():
|
|||
c.execute("SELECT * FROM table_settings_sonarr")
|
||||
settings_sonarr = c.fetchone()
|
||||
c.close()
|
||||
return template('settings', bazarr_version=bazarr_version, settings_general=settings_general, settings_languages=settings_languages, settings_providers=settings_providers, settings_sonarr=settings_sonarr, base_url=base_url)
|
||||
return template('settings', __file__=__file__, bazarr_version=bazarr_version, settings_general=settings_general, settings_languages=settings_languages, settings_providers=settings_providers, settings_sonarr=settings_sonarr, base_url=base_url)
|
||||
|
||||
@route(base_url + 'save_settings', method='POST')
|
||||
def save_settings():
|
||||
|
@ -463,7 +463,7 @@ def system():
|
|||
row_count = i
|
||||
max_page = (row_count / 50) + 1
|
||||
|
||||
return template('system', bazarr_version=bazarr_version, base_url=base_url, task_list=task_list, row_count=row_count, max_page=max_page)
|
||||
return template('system', __file__=__file__, bazarr_version=bazarr_version, base_url=base_url, task_list=task_list, row_count=row_count, max_page=max_page)
|
||||
|
||||
@route(base_url + 'logs/<page:int>')
|
||||
def get_logs(page):
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
padding-left: 1em;
|
||||
padding-right: 128px;
|
||||
}
|
||||
.item .icon {
|
||||
color: LightGray;
|
||||
}
|
||||
.prompt {
|
||||
background-color: #333333 !important;
|
||||
color: white !important;
|
||||
|
@ -24,9 +21,10 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
% import os
|
||||
% import sqlite3
|
||||
|
||||
% conn = sqlite3.connect('data/db/bazarr.db', timeout=30)
|
||||
% conn = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'), timeout=30)
|
||||
% c = conn.cursor()
|
||||
% wanted = c.execute("SELECT COUNT(*) FROM table_episodes WHERE missing_subtitles != '[]'").fetchone()
|
||||
|
||||
|
|
Loading…
Reference in a new issue