mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-11 01:07:36 +08:00
Fix for history when series/movies have been deleted.
This commit is contained in:
parent
a0200b23da
commit
7910fa55ce
1 changed files with 18 additions and 2 deletions
|
@ -1124,7 +1124,13 @@ def history():
|
||||||
def historyseries():
|
def historyseries():
|
||||||
authorize()
|
authorize()
|
||||||
|
|
||||||
row_count = TableHistory.select().count()
|
row_count = TableHistory.select(
|
||||||
|
|
||||||
|
).join_from(
|
||||||
|
TableHistory, TableShows, JOIN.LEFT_OUTER
|
||||||
|
).where(
|
||||||
|
TableShows.title.is_null(False)
|
||||||
|
).count()
|
||||||
page = request.GET.page
|
page = request.GET.page
|
||||||
if page == "":
|
if page == "":
|
||||||
page = "1"
|
page = "1"
|
||||||
|
@ -1168,6 +1174,8 @@ def historyseries():
|
||||||
TableHistory, TableShows, JOIN.LEFT_OUTER
|
TableHistory, TableShows, JOIN.LEFT_OUTER
|
||||||
).join_from(
|
).join_from(
|
||||||
TableHistory, TableEpisodes, JOIN.LEFT_OUTER
|
TableHistory, TableEpisodes, JOIN.LEFT_OUTER
|
||||||
|
).where(
|
||||||
|
TableShows.title.is_null(False)
|
||||||
).order_by(
|
).order_by(
|
||||||
TableHistory.timestamp.desc()
|
TableHistory.timestamp.desc()
|
||||||
).paginate(
|
).paginate(
|
||||||
|
@ -1229,7 +1237,13 @@ def historyseries():
|
||||||
def historymovies():
|
def historymovies():
|
||||||
authorize()
|
authorize()
|
||||||
|
|
||||||
row_count = TableHistoryMovie.select().count()
|
row_count = TableHistoryMovie.select(
|
||||||
|
|
||||||
|
).join_from(
|
||||||
|
TableHistoryMovie, TableMovies, JOIN.LEFT_OUTER
|
||||||
|
).where(
|
||||||
|
TableMovies.title.is_null(False)
|
||||||
|
).count()
|
||||||
page = request.GET.page
|
page = request.GET.page
|
||||||
if page == "":
|
if page == "":
|
||||||
page = "1"
|
page = "1"
|
||||||
|
@ -1269,6 +1283,8 @@ def historymovies():
|
||||||
TableMovies.forced
|
TableMovies.forced
|
||||||
).join_from(
|
).join_from(
|
||||||
TableHistoryMovie, TableMovies, JOIN.LEFT_OUTER
|
TableHistoryMovie, TableMovies, JOIN.LEFT_OUTER
|
||||||
|
).where(
|
||||||
|
TableMovies.title.is_null(False)
|
||||||
).order_by(
|
).order_by(
|
||||||
TableHistoryMovie.timestamp.desc()
|
TableHistoryMovie.timestamp.desc()
|
||||||
).paginate(
|
).paginate(
|
||||||
|
|
Loading…
Reference in a new issue