Dump XMLs of failed PMS items in the log
This commit is contained in:
parent
3ccc588945
commit
0064029885
1 changed files with 50 additions and 8 deletions
|
@ -287,10 +287,16 @@ class Movies(Items):
|
|||
try:
|
||||
self.run_add_update(item, viewtag, viewid)
|
||||
except Exception as e:
|
||||
utils.window('emby_dbScan', clear=True)
|
||||
self.logMsg('itemtypes.py for movies has crashed for item %s. '
|
||||
'Error:' % item.attrib.get('ratingKey', None), -1)
|
||||
self.logMsg(e, -1)
|
||||
self.logMsg('The item xml is:', -1)
|
||||
try:
|
||||
import xml.etree.cElementTree as etree
|
||||
except ImportError:
|
||||
import xml.etree.ElementTree as etree
|
||||
etree.dump(item)
|
||||
utils.window('plex_scancrashed', value='true')
|
||||
# skip this item for now
|
||||
return
|
||||
|
||||
|
@ -920,10 +926,16 @@ class TVShows(Items):
|
|||
try:
|
||||
self.run_add_update(item, viewtag, viewid)
|
||||
except Exception as e:
|
||||
utils.window('emby_dbScan', clear=True)
|
||||
self.logMsg('itemtypes.py for tv show has crashed for item %s. '
|
||||
'Error:' % item.attrib.get('ratingKey', None), -1)
|
||||
self.logMsg(e, -1)
|
||||
self.logMsg('The item xml is:', -1)
|
||||
try:
|
||||
import xml.etree.cElementTree as etree
|
||||
except ImportError:
|
||||
import xml.etree.ElementTree as etree
|
||||
etree.dump(item)
|
||||
utils.window('plex_scancrashed', value='true')
|
||||
# skip this item for now
|
||||
return
|
||||
|
||||
|
@ -1117,10 +1129,16 @@ class TVShows(Items):
|
|||
try:
|
||||
self.run_add_updateSeason(item, viewtag, viewid)
|
||||
except Exception as e:
|
||||
utils.window('emby_dbScan', clear=True)
|
||||
self.logMsg('itemtypes.py for tv seasons has crashed for item %s. '
|
||||
'Error:' % item.attrib.get('ratingKey', None), -1)
|
||||
self.logMsg(e, -1)
|
||||
self.logMsg('The item xml is:', -1)
|
||||
try:
|
||||
import xml.etree.cElementTree as etree
|
||||
except ImportError:
|
||||
import xml.etree.ElementTree as etree
|
||||
etree.dump(item)
|
||||
utils.window('plex_scancrashed', value='true')
|
||||
# skip this item for now
|
||||
return
|
||||
|
||||
|
@ -1162,10 +1180,16 @@ class TVShows(Items):
|
|||
try:
|
||||
self.run_add_updateEpisode(item, viewtag, viewid)
|
||||
except Exception as e:
|
||||
utils.window('emby_dbScan', clear=True)
|
||||
self.logMsg('itemtypes.py for tv episode has crashed for item %s. '
|
||||
'Error:' % item.attrib.get('ratingKey', None), -1)
|
||||
self.logMsg(e, -1)
|
||||
self.logMsg('The item xml is:', -1)
|
||||
try:
|
||||
import xml.etree.cElementTree as etree
|
||||
except ImportError:
|
||||
import xml.etree.ElementTree as etree
|
||||
etree.dump(item)
|
||||
utils.window('plex_scancrashed', value='true')
|
||||
# skip this item for now
|
||||
return
|
||||
|
||||
|
@ -1642,11 +1666,17 @@ class Music(Items):
|
|||
try:
|
||||
self.run_add_updateArtist(item, viewtag, viewid, artisttype)
|
||||
except Exception as e:
|
||||
utils.window('emby_dbScan', clear=True)
|
||||
self.logMsg('itemtypes.py for music artist has crashed for '
|
||||
'item %s. Error:'
|
||||
% item.attrib.get('ratingKey', None), -1)
|
||||
self.logMsg(e, -1)
|
||||
self.logMsg('The item xml is:', -1)
|
||||
try:
|
||||
import xml.etree.cElementTree as etree
|
||||
except ImportError:
|
||||
import xml.etree.ElementTree as etree
|
||||
etree.dump(item)
|
||||
utils.window('plex_scancrashed', value='true')
|
||||
# skip this item for now
|
||||
return
|
||||
|
||||
|
@ -1738,11 +1768,17 @@ class Music(Items):
|
|||
try:
|
||||
self.run_add_updateAlbum(item, viewtag, viewid)
|
||||
except Exception as e:
|
||||
utils.window('emby_dbScan', clear=True)
|
||||
self.logMsg('itemtypes.py for music album has crashed for '
|
||||
'item %s. Error:'
|
||||
% item.attrib.get('ratingKey', None), -1)
|
||||
self.logMsg(e, -1)
|
||||
self.logMsg('The item xml is:', -1)
|
||||
try:
|
||||
import xml.etree.cElementTree as etree
|
||||
except ImportError:
|
||||
import xml.etree.ElementTree as etree
|
||||
etree.dump(item)
|
||||
utils.window('plex_scancrashed', value='true')
|
||||
# skip this item for now
|
||||
return
|
||||
|
||||
|
@ -1936,11 +1972,17 @@ class Music(Items):
|
|||
try:
|
||||
self.run_add_updateSong(item, viewtag, viewid)
|
||||
except Exception as e:
|
||||
utils.window('emby_dbScan', clear=True)
|
||||
self.logMsg('itemtypes.py for music song has crashed for '
|
||||
'item %s. Error:'
|
||||
% item.attrib.get('ratingKey', None), -1)
|
||||
self.logMsg(e, -1)
|
||||
self.logMsg('The item xml is:', -1)
|
||||
try:
|
||||
import xml.etree.cElementTree as etree
|
||||
except ImportError:
|
||||
import xml.etree.ElementTree as etree
|
||||
etree.dump(item)
|
||||
utils.window('plex_scancrashed', value='true')
|
||||
# skip this item for now
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue