[25] run-metadata now ignores more

pull/966/head^2
meisnate12 2 years ago
parent ae3f3b04be
commit 2c39fa0b74

@ -38,7 +38,7 @@ jobs:
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/plex-meta-manager:nightly

@ -1 +1 @@
1.17.1-develop24
1.17.1-develop25

@ -3,7 +3,7 @@ from abc import ABC, abstractmethod
from modules import util, operations
from modules.meta import MetadataFile, OverlayFile
from modules.operations import Operations
from modules.util import Failed, YAML
from modules.util import Failed, NotScheduled, YAML
logger = util.logger
@ -138,6 +138,9 @@ class Library(ABC):
self.metadata_files.append(meta_obj)
except Failed as e:
logger.error(e)
except NotScheduled as e:
logger.info("")
logger.separator(f"Skipping {e} Metadata File")
if not operations_only and not collection_only:
for file_type, overlay_file, temp_vars, asset_directory in self.overlay_path:
try:

@ -1,7 +1,7 @@
import math, operator, os, re, requests
from datetime import datetime
from modules import plex, ergast, overlay, util
from modules.util import Failed, YAML
from modules import plex, ergast, util
from modules.util import Failed, NotScheduled, YAML
from plexapi.exceptions import NotFound, BadRequest
logger = util.logger
@ -347,6 +347,9 @@ class DataFile:
class MetadataFile(DataFile):
def __init__(self, config, library, file_type, path, temp_vars, asset_directory):
super().__init__(config, file_type, path, temp_vars, asset_directory)
metadata_name = self.get_file_name()
if config.requested_metadata_files and metadata_name not in config.requested_metadata_files:
raise NotScheduled(metadata_name)
self.data_type = "Collection"
self.library = library
if file_type == "Data":

@ -246,7 +246,7 @@ def run_config(config, stats):
playlist_status = {}
playlist_stats = {}
if (config.playlist_files or config.general["playlist_report"]) and not overlays_only and not operations_only and not collection_only:
if (config.playlist_files or config.general["playlist_report"]) and not overlays_only and not operations_only and not collection_only and not config.requested_metadata_files:
logger.add_playlists_handler()
if config.playlist_files:
playlist_status, playlist_stats = run_playlists(config)
@ -462,12 +462,16 @@ def run_libraries(config):
library.map_guids(temp_items)
library_status[library.name]["Library Loading and Mapping"] = str(datetime.now() - time_start).split('.')[0]
if config.library_first and not config.test_mode and not collection_only and not playlist_only:
def run_operations_and_overlays():
if not config.test_mode and not collection_only and not playlist_only and not config.requested_metadata_files:
if not overlays_only and library.library_operation:
library_status[library.name]["Library Operations"] = library.Operations.run_operations()
if not operations_only and (library.overlay_files or library.remove_overlays):
library_status[library.name]["Library Overlays"] = library.Overlays.run_overlays()
if config.library_first:
run_operations_and_overlays()
if not operations_only and not overlays_only and not playlist_only:
time_start = datetime.now()
for metadata in library.metadata_files:
@ -497,11 +501,8 @@ def run_libraries(config):
logger.re_add_library_handler(library.mapping_name)
library_status[library.name]["Library Metadata Files"] = str(datetime.now() - time_start).split('.')[0]
if not config.library_first and not config.test_mode and not collection_only and not playlist_only:
if not overlays_only and library.library_operation:
library_status[library.name]["Library Operations"] = library.Operations.run_operations()
if not operations_only and (library.overlay_files or library.remove_overlays):
library_status[library.name]["Library Overlays"] = library.Overlays.run_overlays()
if not config.library_first:
run_operations_and_overlays()
logger.remove_library_handler(library.mapping_name)
except Exception as e:

Loading…
Cancel
Save