mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-25 01:02:19 +00:00
Fixed wanted list ordering. #1475
This commit is contained in:
parent
31dcd37d52
commit
6eeaa46bbf
2 changed files with 6 additions and 2 deletions
|
@ -1696,6 +1696,7 @@ class EpisodesWanted(Resource):
|
||||||
TableShows.seriesType)\
|
TableShows.seriesType)\
|
||||||
.join(TableShows, on=(TableEpisodes.sonarrSeriesId == TableShows.sonarrSeriesId))\
|
.join(TableShows, on=(TableEpisodes.sonarrSeriesId == TableShows.sonarrSeriesId))\
|
||||||
.where(wanted_condition)\
|
.where(wanted_condition)\
|
||||||
|
.order_by(TableEpisodes.rowid.desc())\
|
||||||
.limit(length)\
|
.limit(length)\
|
||||||
.offset(start)\
|
.offset(start)\
|
||||||
.dicts()
|
.dicts()
|
||||||
|
@ -1749,7 +1750,7 @@ class MoviesWanted(Resource):
|
||||||
TableMovies.tags,
|
TableMovies.tags,
|
||||||
TableMovies.monitored)\
|
TableMovies.monitored)\
|
||||||
.where(wanted_condition)\
|
.where(wanted_condition)\
|
||||||
.order_by(TableMovies.radarrId.desc())\
|
.order_by(TableMovies.rowid.desc())\
|
||||||
.limit(length)\
|
.limit(length)\
|
||||||
.offset(start)\
|
.offset(start)\
|
||||||
.dicts()
|
.dicts()
|
||||||
|
|
|
@ -8,6 +8,7 @@ from peewee import *
|
||||||
from playhouse.sqliteq import SqliteQueueDatabase
|
from playhouse.sqliteq import SqliteQueueDatabase
|
||||||
from playhouse.shortcuts import model_to_dict
|
from playhouse.shortcuts import model_to_dict
|
||||||
from playhouse.migrate import *
|
from playhouse.migrate import *
|
||||||
|
from playhouse.sqlite_ext import RowIDField
|
||||||
|
|
||||||
from helper import path_mappings
|
from helper import path_mappings
|
||||||
from config import settings, get_array_from
|
from config import settings, get_array_from
|
||||||
|
@ -69,6 +70,7 @@ class TableBlacklistMovie(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
class TableEpisodes(BaseModel):
|
class TableEpisodes(BaseModel):
|
||||||
|
rowid = RowIDField()
|
||||||
audio_codec = TextField(null=True)
|
audio_codec = TextField(null=True)
|
||||||
audio_language = TextField(null=True)
|
audio_language = TextField(null=True)
|
||||||
episode = IntegerField()
|
episode = IntegerField()
|
||||||
|
@ -140,6 +142,7 @@ class TableLanguagesProfiles(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
class TableMovies(BaseModel):
|
class TableMovies(BaseModel):
|
||||||
|
rowid = RowIDField()
|
||||||
alternativeTitles = TextField(null=True)
|
alternativeTitles = TextField(null=True)
|
||||||
audio_codec = TextField(null=True)
|
audio_codec = TextField(null=True)
|
||||||
audio_language = TextField(null=True)
|
audio_language = TextField(null=True)
|
||||||
|
@ -163,7 +166,7 @@ class TableMovies(BaseModel):
|
||||||
subtitles = TextField(null=True)
|
subtitles = TextField(null=True)
|
||||||
tags = TextField(null=True)
|
tags = TextField(null=True)
|
||||||
title = TextField()
|
title = TextField()
|
||||||
tmdbId = TextField(primary_key=True)
|
tmdbId = TextField(unique=True)
|
||||||
video_codec = TextField(null=True)
|
video_codec = TextField(null=True)
|
||||||
year = TextField(null=True)
|
year = TextField(null=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue