mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[96] fix image sets
This commit is contained in:
parent
17bebed143
commit
f713899a12
6 changed files with 29 additions and 34 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.18.3-develop95
|
||||
1.18.3-develop96
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
templates:
|
||||
|
||||
images:
|
||||
optional:
|
||||
- file
|
||||
- url
|
||||
- git
|
||||
- repo
|
||||
- style
|
||||
conditionals:
|
||||
pmm:
|
||||
conditions:
|
||||
- file.exists: false
|
||||
url.exists: false
|
||||
git.exists: false
|
||||
repo.exists: false
|
||||
value: sets/<<set>>/<<style>>
|
||||
mapping_id: <<id>>
|
||||
image_set:
|
||||
pmm: <<pmm>>
|
||||
file: <<file>>
|
||||
url: <<url>>
|
||||
git: <<git>>
|
||||
repo: <<repo>>
|
|
@ -217,4 +217,27 @@ templates:
|
|||
- <<translation_key>>_summary
|
||||
- <<translation_key>>_name
|
||||
summary: <<summary_<<key>>>>
|
||||
name: <<name_<<key>>>>
|
||||
name: <<name_<<key>>>>
|
||||
|
||||
images:
|
||||
optional:
|
||||
- file
|
||||
- url
|
||||
- git
|
||||
- repo
|
||||
- style
|
||||
conditionals:
|
||||
pmm:
|
||||
conditions:
|
||||
- file.exists: false
|
||||
url.exists: false
|
||||
git.exists: false
|
||||
repo.exists: false
|
||||
value: images/<<set>>/<<style>>
|
||||
mapping_id: <<id>>
|
||||
image_set:
|
||||
pmm: <<pmm>>
|
||||
file: <<file>>
|
||||
url: <<url>>
|
||||
git: <<git>>
|
||||
repo: <<repo>>
|
||||
|
|
|
@ -96,7 +96,7 @@ class DataFile:
|
|||
else:
|
||||
return data
|
||||
|
||||
def load_file(self, file_type, file_path, overlay=False, metadata=False, translation=False):
|
||||
def load_file(self, file_type, file_path, overlay=False, translation=False):
|
||||
if translation:
|
||||
if file_path.endswith(".yml"):
|
||||
file_path = file_path[:-4]
|
||||
|
@ -117,19 +117,15 @@ class DataFile:
|
|||
yaml = YAML(input_data=response.content, check_empty=True)
|
||||
else:
|
||||
if file_type == "PMM Default":
|
||||
if not overlay and not metadata and file_path.startswith(("movie/", "chart/", "award/")):
|
||||
if not overlay and file_path.startswith(("movie/", "chart/", "award/")):
|
||||
file_path = file_path[6:]
|
||||
elif not overlay and not metadata and file_path.startswith(("show/", "both/")):
|
||||
elif not overlay and file_path.startswith(("show/", "both/")):
|
||||
file_path = file_path[5:]
|
||||
elif overlay and not metadata and file_path.startswith("overlays/"):
|
||||
file_path = file_path[9:]
|
||||
elif metadata and not overlay and file_path.startswith("metadata/"):
|
||||
elif overlay and file_path.startswith("overlays/"):
|
||||
file_path = file_path[9:]
|
||||
defaults_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "defaults")
|
||||
if overlay:
|
||||
defaults_path = os.path.join(defaults_path, "overlays")
|
||||
elif metadata:
|
||||
defaults_path = os.path.join(defaults_path, "metadata")
|
||||
if os.path.exists(os.path.join(defaults_path, file_path)):
|
||||
file_path = os.path.join(defaults_path, file_path)
|
||||
elif self.library:
|
||||
|
|
Loading…
Reference in a new issue