remove unused external keys
This commit is contained in:
parent
97a38513a3
commit
1d40ceca8f
2 changed files with 10 additions and 0 deletions
|
@ -307,6 +307,11 @@ class Item(models.Model):
|
||||||
response = external_data('getData', {'id': self.public_id})
|
response = external_data('getData', {'id': self.public_id})
|
||||||
if response['status']['code'] == 200:
|
if response['status']['code'] == 200:
|
||||||
self.external_data = response['data']
|
self.external_data = response['data']
|
||||||
|
keys = [
|
||||||
|
k['id'] for k in settings.CONFIG['itemKeys']
|
||||||
|
] + settings.ADDITIONAL_IMDB_KEYS
|
||||||
|
for key in set(self.external_data) - set(keys):
|
||||||
|
del self.external_data[key]
|
||||||
self.save(sync=True)
|
self.save(sync=True)
|
||||||
if poster_url != self.prefered_poster_url():
|
if poster_url != self.prefered_poster_url():
|
||||||
self.remove_poster()
|
self.remove_poster()
|
||||||
|
|
|
@ -217,6 +217,11 @@ POSTER_PRECEDENCE = ()
|
||||||
POSTER_ONLY_PORTRAIT = ()
|
POSTER_ONLY_PORTRAIT = ()
|
||||||
|
|
||||||
USE_IMDB = False
|
USE_IMDB = False
|
||||||
|
ADDITIONAL_IMDB_KEYS = [
|
||||||
|
'cast',
|
||||||
|
'links', 'reviews', 'posters',
|
||||||
|
'alternativeTitles', 'originalTitle',
|
||||||
|
]
|
||||||
|
|
||||||
#If you set VIDEO_PREFIX make sure cookies work accros subsomains
|
#If you set VIDEO_PREFIX make sure cookies work accros subsomains
|
||||||
#by setting SESSION_COOKIE_DOMAIN to ".domain.tld"
|
#by setting SESSION_COOKIE_DOMAIN to ".domain.tld"
|
||||||
|
|
Loading…
Reference in a new issue