mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-25 22:10:22 +00:00
fix season custom sort
This commit is contained in:
parent
baa56d79bb
commit
04f0ad0aac
2 changed files with 7 additions and 4 deletions
|
@ -364,7 +364,6 @@ class CollectionBuilder:
|
|||
raise Failed(f"{self.Type} Error: collection_level attribute is blank")
|
||||
else:
|
||||
logger.debug(f"Value: {self.data[methods['collection_level']]}")
|
||||
|
||||
if (self.library.is_show and self.data[methods["collection_level"]].lower() in plex.collection_level_show_options) or \
|
||||
(self.library.is_music and self.data[methods["collection_level"]].lower() in plex.collection_level_music_options):
|
||||
self.collection_level = self.data[methods["collection_level"]].lower()
|
||||
|
@ -475,7 +474,7 @@ class CollectionBuilder:
|
|||
else:
|
||||
raise Failed(f"{self.Type} Error: {test_sort} collection_order invalid\n\trelease (Order Collection by release dates)\n\talpha (Order Collection Alphabetically)\n\tcustom (Custom Order Collection)\n\tOther sorting options can be found at https://github.com/meisnate12/Plex-Meta-Manager/wiki/Smart-Builders#sort-options")
|
||||
|
||||
if self.smart_url or self.smart_label_collection or self.parts_collection:
|
||||
if self.smart_url or self.smart_label_collection:
|
||||
self.custom_sort = False
|
||||
|
||||
for method_key, method_data in self.data.items():
|
||||
|
@ -604,7 +603,7 @@ class CollectionBuilder:
|
|||
self.sonarr_details["add_missing"] = False
|
||||
self.sonarr_details["add_existing"] = False
|
||||
|
||||
if self.radarr_details["add_existing"] or self.sonarr_details["add_existing"]:
|
||||
if (self.radarr_details["add_existing"] or self.sonarr_details["add_existing"]) and not self.parts_collection:
|
||||
self.item_details["add_existing"] = True
|
||||
|
||||
if self.collectionless:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import logging, requests, time
|
||||
from lxml.etree import ParserError
|
||||
from modules import util
|
||||
from modules.util import Failed
|
||||
|
||||
|
@ -51,7 +52,10 @@ class TVDbObj:
|
|||
|
||||
if self.config.trace_mode:
|
||||
logger.debug(f"URL: {tvdb_url}")
|
||||
response = self.config.get_html(self.tvdb_url, headers=util.header(self.language))
|
||||
try:
|
||||
response = self.config.get_html(self.tvdb_url, headers=util.header(self.language))
|
||||
except ParserError:
|
||||
raise Failed(f"TVDb Error: Could not parse {self.tvdb_url}")
|
||||
results = response.xpath(f"//*[text()='TheTVDB.com {self.media_type} ID']/parent::node()/span/text()")
|
||||
if len(results) > 0:
|
||||
self.id = int(results[0])
|
||||
|
|
Loading…
Reference in a new issue