1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-24 08:43:01 +00:00

Fixed wanted list ordering. #1475

This commit is contained in:
morpheus65535 2021-07-20 08:05:30 -04:00
parent 31dcd37d52
commit 6eeaa46bbf
2 changed files with 6 additions and 2 deletions

View file

@ -1696,6 +1696,7 @@ class EpisodesWanted(Resource):
TableShows.seriesType)\
.join(TableShows, on=(TableEpisodes.sonarrSeriesId == TableShows.sonarrSeriesId))\
.where(wanted_condition)\
.order_by(TableEpisodes.rowid.desc())\
.limit(length)\
.offset(start)\
.dicts()
@ -1749,7 +1750,7 @@ class MoviesWanted(Resource):
TableMovies.tags,
TableMovies.monitored)\
.where(wanted_condition)\
.order_by(TableMovies.radarrId.desc())\
.order_by(TableMovies.rowid.desc())\
.limit(length)\
.offset(start)\
.dicts()

View file

@ -8,6 +8,7 @@ from peewee import *
from playhouse.sqliteq import SqliteQueueDatabase
from playhouse.shortcuts import model_to_dict
from playhouse.migrate import *
from playhouse.sqlite_ext import RowIDField
from helper import path_mappings
from config import settings, get_array_from
@ -69,6 +70,7 @@ class TableBlacklistMovie(BaseModel):
class TableEpisodes(BaseModel):
rowid = RowIDField()
audio_codec = TextField(null=True)
audio_language = TextField(null=True)
episode = IntegerField()
@ -140,6 +142,7 @@ class TableLanguagesProfiles(BaseModel):
class TableMovies(BaseModel):
rowid = RowIDField()
alternativeTitles = TextField(null=True)
audio_codec = TextField(null=True)
audio_language = TextField(null=True)
@ -163,7 +166,7 @@ class TableMovies(BaseModel):
subtitles = TextField(null=True)
tags = TextField(null=True)
title = TextField()
tmdbId = TextField(primary_key=True)
tmdbId = TextField(unique=True)
video_codec = TextField(null=True)
year = TextField(null=True)