mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-17 14:55:07 -05:00
Fixed issue with theTVDB IndexerAPI _parseActors method improperly parsing the data returned from the api causing an exception to occur during metadata refreshes.
Fixed issues with Backup/Restore. Fixed issues with banners, posters, images via showPoster method.
This commit is contained in:
parent
4fd92a8631
commit
c8b050704b
@ -5,7 +5,7 @@ $(document).ready(function(){
|
|||||||
$("#Backup").attr("disabled", true);
|
$("#Backup").attr("disabled", true);
|
||||||
$('#Backup-result').html(loading);
|
$('#Backup-result').html(loading);
|
||||||
var backupDir = $("#backupDir").val();
|
var backupDir = $("#backupDir").val();
|
||||||
$.get(sbRoot + "/config/backup", {'backupDir': backupDir})
|
$.get(sbRoot + "/config/backup/", {'backupDir': backupDir})
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
$('#Backup-result').html(data);
|
$('#Backup-result').html(data);
|
||||||
$("#Backup").attr("disabled", false);
|
$("#Backup").attr("disabled", false);
|
||||||
@ -15,7 +15,7 @@ $(document).ready(function(){
|
|||||||
$("#Restore").attr("disabled", true);
|
$("#Restore").attr("disabled", true);
|
||||||
$('#Restore-result').html(loading);
|
$('#Restore-result').html(loading);
|
||||||
var backupFile = $("#backupFile").val();
|
var backupFile = $("#backupFile").val();
|
||||||
$.get(sbRoot + "/config/restore", {'backupFile': backupFile})
|
$.get(sbRoot + "/config/restore/", {'backupFile': backupFile})
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
$('#Restore-result').html(data);
|
$('#Restore-result').html(data);
|
||||||
$("#Restore").attr("disabled", false);
|
$("#Restore").attr("disabled", false);
|
||||||
|
@ -797,18 +797,20 @@ class Tvdb:
|
|||||||
return
|
return
|
||||||
|
|
||||||
cur_actors = Actors()
|
cur_actors = Actors()
|
||||||
for curActorItem in actorsEt["actor"].items():
|
for cur_actor in actorsEt['actor']:
|
||||||
curActor = Actor()
|
curActor = Actor()
|
||||||
for k, v in curActorItem:
|
for k, v in cur_actor.items():
|
||||||
|
if k is None or v is None:
|
||||||
|
continue
|
||||||
|
|
||||||
k = k.lower()
|
k = k.lower()
|
||||||
if v is not None:
|
if k == "image":
|
||||||
if k == "image":
|
v = self.config['url_artworkPrefix'] % (v)
|
||||||
v = self.config['url_artworkPrefix'] % (v)
|
else:
|
||||||
else:
|
v = self._cleanData(v)
|
||||||
v = self._cleanData(v)
|
|
||||||
curActor[k] = v
|
curActor[k] = v
|
||||||
cur_actors.append(curActor)
|
cur_actors.append(curActor)
|
||||||
|
|
||||||
self._setShowData(sid, '_actors', cur_actors)
|
self._setShowData(sid, '_actors', cur_actors)
|
||||||
|
|
||||||
def _getShowData(self, sid, language, getEpInfo=False):
|
def _getShowData(self, sid, language, getEpInfo=False):
|
||||||
|
@ -189,19 +189,16 @@ class KODI_12PlusMetadata(generic.GenericMetadata):
|
|||||||
cur_actor = etree.SubElement(tv_node, "actor")
|
cur_actor = etree.SubElement(tv_node, "actor")
|
||||||
|
|
||||||
cur_actor_name = etree.SubElement(cur_actor, "name")
|
cur_actor_name = etree.SubElement(cur_actor, "name")
|
||||||
cur_actor_name_text = actor['name']
|
if getattr(actor, 'name', None) is not None:
|
||||||
if isinstance(cur_actor_name_text, basestring):
|
cur_actor_name.text = actor['name'].strip()
|
||||||
cur_actor_name.text = cur_actor_name_text.strip()
|
|
||||||
|
|
||||||
cur_actor_role = etree.SubElement(cur_actor, "role")
|
cur_actor_role = etree.SubElement(cur_actor, "role")
|
||||||
cur_actor_role_text = actor['role']
|
if getattr(actor, 'role', None) is not None:
|
||||||
if cur_actor_role_text != None:
|
cur_actor_role.text = actor['role']
|
||||||
cur_actor_role.text = cur_actor_role_text
|
|
||||||
|
|
||||||
cur_actor_thumb = etree.SubElement(cur_actor, "thumb")
|
cur_actor_thumb = etree.SubElement(cur_actor, "thumb")
|
||||||
cur_actor_thumb_text = actor['image']
|
if getattr(actor, 'image', None) is not None:
|
||||||
if cur_actor_thumb_text != None:
|
cur_actor_thumb.text = actor['image']
|
||||||
cur_actor_thumb.text = cur_actor_thumb_text
|
|
||||||
|
|
||||||
# Make it purdy
|
# Make it purdy
|
||||||
helpers.indentXML(tv_node)
|
helpers.indentXML(tv_node)
|
||||||
|
@ -199,8 +199,7 @@ class Mede8erMetadata(mediabrowser.MediaBrowserMetadata):
|
|||||||
|
|
||||||
if getattr(myShow, '_actors', None) is not None:
|
if getattr(myShow, '_actors', None) is not None:
|
||||||
for actor in myShow['_actors']:
|
for actor in myShow['_actors']:
|
||||||
cur_actor_name_text = actor['name']
|
cur_actor_name_text = getattr(actor, 'name', None)
|
||||||
|
|
||||||
if cur_actor_name_text != None and cur_actor_name_text.strip():
|
if cur_actor_name_text != None and cur_actor_name_text.strip():
|
||||||
cur_actor = etree.SubElement(cast, "actor")
|
cur_actor = etree.SubElement(cast, "actor")
|
||||||
cur_actor.text = cur_actor_name_text.strip()
|
cur_actor.text = cur_actor_name_text.strip()
|
||||||
|
@ -362,14 +362,17 @@ class MediaBrowserMetadata(generic.GenericMetadata):
|
|||||||
if getattr(myShow, 'actors', None) is not None:
|
if getattr(myShow, 'actors', None) is not None:
|
||||||
for actor in myShow['_actors']:
|
for actor in myShow['_actors']:
|
||||||
cur_actor = etree.SubElement(Persons, "Person")
|
cur_actor = etree.SubElement(Persons, "Person")
|
||||||
|
|
||||||
cur_actor_name = etree.SubElement(cur_actor, "Name")
|
cur_actor_name = etree.SubElement(cur_actor, "Name")
|
||||||
cur_actor_name.text = actor['name'].strip()
|
if getattr(actor, 'name', None):
|
||||||
|
cur_actor_name.text = actor['name'].strip()
|
||||||
|
|
||||||
cur_actor_type = etree.SubElement(cur_actor, "Type")
|
cur_actor_type = etree.SubElement(cur_actor, "Type")
|
||||||
cur_actor_type.text = "Actor"
|
cur_actor_type.text = "Actor"
|
||||||
|
|
||||||
cur_actor_role = etree.SubElement(cur_actor, "Role")
|
cur_actor_role = etree.SubElement(cur_actor, "Role")
|
||||||
cur_actor_role_text = actor['role']
|
if getattr(actor, 'role', None):
|
||||||
if cur_actor_role_text != None:
|
cur_actor_role.text = actor['role']
|
||||||
cur_actor_role.text = cur_actor_role_text
|
|
||||||
|
|
||||||
helpers.indentXML(tv_node)
|
helpers.indentXML(tv_node)
|
||||||
|
|
||||||
|
@ -275,12 +275,14 @@ class WDTVMetadata(generic.GenericMetadata):
|
|||||||
if getattr(myShow, '_actors', None) is not None:
|
if getattr(myShow, '_actors', None) is not None:
|
||||||
for actor in myShow['_actors']:
|
for actor in myShow['_actors']:
|
||||||
cur_actor = etree.SubElement(episode, "actor")
|
cur_actor = etree.SubElement(episode, "actor")
|
||||||
|
|
||||||
cur_actor_name = etree.SubElement(cur_actor, "name")
|
cur_actor_name = etree.SubElement(cur_actor, "name")
|
||||||
cur_actor_name.text = actor['name']
|
if getattr(actor, 'name', None):
|
||||||
|
cur_actor_name.text = actor['name']
|
||||||
|
|
||||||
cur_actor_role = etree.SubElement(cur_actor, "role")
|
cur_actor_role = etree.SubElement(cur_actor, "role")
|
||||||
cur_actor_role_text = actor['role']
|
if getattr(actor, 'role', None):
|
||||||
if cur_actor_role_text != None:
|
cur_actor_role.text = actor['role']
|
||||||
cur_actor_role.text = cur_actor_role_text
|
|
||||||
|
|
||||||
overview = etree.SubElement(episode, "overview")
|
overview = etree.SubElement(episode, "overview")
|
||||||
if curEpToWrite.description != None:
|
if curEpToWrite.description != None:
|
||||||
|
@ -24,6 +24,7 @@ import time
|
|||||||
import urllib
|
import urllib
|
||||||
import re
|
import re
|
||||||
import datetime
|
import datetime
|
||||||
|
import urlparse
|
||||||
|
|
||||||
import sickbeard
|
import sickbeard
|
||||||
from sickbeard import config, sab
|
from sickbeard import config, sab
|
||||||
@ -371,7 +372,7 @@ class WebRoot(WebHandler):
|
|||||||
default_image_name = 'banner.png'
|
default_image_name = 'banner.png'
|
||||||
|
|
||||||
#image_path = ek.ek(os.path.join, sickbeard.PROG_DIR, 'gui', 'slick', 'images', default_image_name)
|
#image_path = ek.ek(os.path.join, sickbeard.PROG_DIR, 'gui', 'slick', 'images', default_image_name)
|
||||||
static_image_path = '/images/' + default_image_name
|
static_image_path = os.path.join('/images', default_image_name)
|
||||||
if show and sickbeard.helpers.findCertainShow(sickbeard.showList, int(show)):
|
if show and sickbeard.helpers.findCertainShow(sickbeard.showList, int(show)):
|
||||||
cache_obj = image_cache.ImageCache()
|
cache_obj = image_cache.ImageCache()
|
||||||
|
|
||||||
@ -386,9 +387,9 @@ class WebRoot(WebHandler):
|
|||||||
image_file_name = cache_obj.banner_thumb_path(show)
|
image_file_name = cache_obj.banner_thumb_path(show)
|
||||||
|
|
||||||
if ek.ek(os.path.isfile, image_file_name):
|
if ek.ek(os.path.isfile, image_file_name):
|
||||||
image_path = image_file_name
|
static_image_path = os.path.normpath(image_file_name.replace(sickbeard.CACHE_DIR, '/cache'))
|
||||||
static_image_path = '/cache' + image_path.replace(sickbeard.CACHE_DIR, '')
|
|
||||||
|
|
||||||
|
static_image_path = static_image_path.replace('\\', '/')
|
||||||
return self.redirect(static_image_path)
|
return self.redirect(static_image_path)
|
||||||
|
|
||||||
def setHomeLayout(self, layout):
|
def setHomeLayout(self, layout):
|
||||||
|
Loading…
Reference in New Issue
Block a user