Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SiCKRAGE
sickrage
Commits
23a06aaf
Commit
23a06aaf
authored
Mar 23, 2020
by
echel0n
Browse files
Removed SceneException table and SceneExceptionRefresh table from Cache database.
parent
104163bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
sickrage/core/databases/cache/__init__.py
View file @
23a06aaf
...
...
@@ -76,14 +76,6 @@ class CacheDB(SRDatabase):
provider
=
Column
(
String
(
32
),
primary_key
=
True
)
time
=
Column
(
Integer
)
class
SceneException
(
CacheDBBase
):
__tablename__
=
'scene_exceptions'
id
=
Column
(
Integer
,
primary_key
=
True
)
indexer_id
=
Column
(
Integer
)
show_name
=
Column
(
Text
)
season
=
Column
(
Integer
)
class
SceneName
(
CacheDBBase
):
__tablename__
=
'scene_names'
...
...
@@ -97,12 +89,6 @@ class CacheDB(SRDatabase):
network_name
=
Column
(
String
(
256
),
primary_key
=
True
)
timezone
=
Column
(
Text
)
class
SceneExceptionRefresh
(
CacheDBBase
):
__tablename__
=
'scene_exceptions_refresh'
exception_list
=
Column
(
String
(
32
),
primary_key
=
True
)
last_refreshed
=
Column
(
Integer
)
class
Provider
(
CacheDBBase
):
__tablename__
=
'providers'
...
...
sickrage/core/webserver/handlers/api.py
View file @
23a06aaf
...
...
@@ -989,23 +989,19 @@ class CMD_Exceptions(ApiCall):
async
def
run
(
self
):
""" Get the scene exceptions for all or a given show """
session
=
sickrage
.
app
.
cache_db
.
session
()
if
self
.
indexerid
is
None
:
scene_exceptions
=
{}
for
dbData
in
session
.
query
(
CacheDB
.
SceneException
):
indexer_id
=
dbData
.
indexer_id
for
show
in
get_show_list
(
):
indexer_id
=
show
.
indexer_id
if
indexer_id
not
in
scene_exceptions
:
scene_exceptions
[
indexer_id
]
=
[]
scene_exceptions
[
indexer_id
].
append
(
dbData
.
show
_
name
)
scene_exceptions
[
indexer_id
].
append
(
show
.
name
)
else
:
show
Obj
=
find_show
(
int
(
self
.
indexerid
))
if
not
show
Obj
:
show
=
find_show
(
int
(
self
.
indexerid
))
if
not
show
:
return
await
_responds
(
RESULT_FAILURE
,
msg
=
"Show not found"
)
scene_exceptions
=
[]
for
dbData
in
session
.
query
(
CacheDB
.
SceneException
).
filter_by
(
indexer_id
=
self
.
indexerid
):
scene_exceptions
.
append
(
dbData
.
show_name
)
scene_exceptions
=
show
.
scene_exceptions
return
await
_responds
(
RESULT_SUCCESS
,
scene_exceptions
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment