Fix AttributeError
This commit is contained in:
parent
a0e14ca2cb
commit
4515559dff
2 changed files with 7 additions and 3 deletions
|
@ -175,10 +175,9 @@ def _process_section(section_xml, kodidb, plexdb, sorted_sections,
|
||||||
nodes.append(section_name)
|
nodes.append(section_name)
|
||||||
totalnodes += 1
|
totalnodes += 1
|
||||||
# Update items with new tag
|
# Update items with new tag
|
||||||
for item in plexdb.kodi_id_by_section(section_id):
|
for kodi_id in plexdb.kodiid_by_sectionid(section_id, plex_type):
|
||||||
# Remove the "s" from viewtype for tags
|
|
||||||
kodidb.update_tag(
|
kodidb.update_tag(
|
||||||
current_tagid, tagid, item[0], current_sectiontype[:-1])
|
current_tagid, tagid, kodi_id, current_sectiontype)
|
||||||
else:
|
else:
|
||||||
# Validate the playlist exists or recreate it
|
# Validate the playlist exists or recreate it
|
||||||
if (section_name not in playlists and plex_type in
|
if (section_name not in playlists and plex_type in
|
||||||
|
|
|
@ -148,6 +148,11 @@ class PlexDBBase(object):
|
||||||
self.cursor.execute('SELECT plex_id FROM %s WHERE section_id = ?' % plex_type,
|
self.cursor.execute('SELECT plex_id FROM %s WHERE section_id = ?' % plex_type,
|
||||||
(section_id, )))
|
(section_id, )))
|
||||||
|
|
||||||
|
def kodiid_by_sectionid(self, section_id, plex_type):
|
||||||
|
return (x[0] for x in
|
||||||
|
self.cursor.execute('SELECT kodi_id FROM %s WHERE section_id = ?' % plex_type,
|
||||||
|
(section_id, )))
|
||||||
|
|
||||||
|
|
||||||
def initialize():
|
def initialize():
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue