Browse Source

Merge branch 'hotfix/0.21.3'

tags/release_0.21.3^0 release_0.21.3
JackDandy 5 years ago
parent
commit
17678d1afb
  1. 11
      sickbeard/metadata/kodi.py

11
sickbeard/metadata/kodi.py

@ -430,6 +430,7 @@ def set_nfo_uid_updated(*args, **kwargs):
def remove_default_attr(*args, **kwargs):
try:
from .. import db
msg = 'Changing Kodi Nfo'
sickbeard.classes.loading_msg.set_msg_progress(msg, '0%')
@ -437,6 +438,7 @@ def remove_default_attr(*args, **kwargs):
kodi = metadata_class()
num_shows = len(sickbeard.showList)
for n, cur_show_obj in enumerate(sickbeard.showList):
try:
changed = False
with cur_show_obj.lock:
# call for progress with value
@ -490,6 +492,7 @@ def remove_default_attr(*args, **kwargs):
# episodes
episodes = cur_show_obj.get_all_episodes(has_location=True)
for cur_ep_obj in episodes:
try:
changed = False
nfo_path = kodi.get_episode_file_path(cur_ep_obj)
if nfo_path and ek.ek(os.path.isfile, nfo_path):
@ -513,9 +516,17 @@ def remove_default_attr(*args, **kwargs):
helpers.indent_xml(xmltree.getroot())
helpers.write_file(nfo_path, xmltree, xmltree=True, utf8=True)
except(BaseException, Exception):
pass
except(BaseException, Exception):
pass
db.DBConnection().set_flag('kodi_nfo_default_removed')
sickbeard.classes.loading_msg.set_msg_progress(msg, '100%')
except(BaseException, Exception):
pass
# present a standard "interface" from the module
metadata_class = KODIMetadata

Loading…
Cancel
Save