From a9c26691a22c33f40377623c77015ca51ca26234 Mon Sep 17 00:00:00 2001 From: Halali Date: Sat, 19 Oct 2019 21:21:23 +0200 Subject: [PATCH] Change ordering source for wanted items --- bazarr/database.py | 2 ++ bazarr/main.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bazarr/database.py b/bazarr/database.py index 94846abd2..95168a980 100644 --- a/bazarr/database.py +++ b/bazarr/database.py @@ -70,6 +70,7 @@ class TableShows(BaseModel): class TableEpisodes(BaseModel): + rowid = IntegerField() audio_codec = TextField(null=True) episode = IntegerField(null=False) failed_attempts = TextField(column_name='failedAttempts', null=True) @@ -97,6 +98,7 @@ class TableEpisodes(BaseModel): class TableMovies(BaseModel): + rowid = IntegerField() alternative_titles = TextField(column_name='alternativeTitles', null=True) audio_codec = TextField(null=True) audio_language = TextField(null=True) diff --git a/bazarr/main.py b/bazarr/main.py index 9b42594a4..cce6435e3 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -1395,7 +1395,7 @@ def wantedseries(): ).where( reduce(operator.and_, missing_subtitles_clause) ).order_by( - TableEpisodes.sonarr_episode_id.desc() + TableEpisodes.rowid.desc() ).paginate( int(page), page_size @@ -1439,7 +1439,7 @@ def wantedmovies(): ).where( reduce(operator.and_, missing_subtitles_clause) ).order_by( - TableMovies.radarr_id.desc() + TableMovies.rowid.desc() ).paginate( int(page), page_size