[62] github version fixes

pull/858/head
meisnate12 3 years ago
parent d8d1730fc8
commit a4634e45e7

@ -1 +1 @@
1.16.5-develop61
1.16.5-develop62

@ -51,17 +51,40 @@ Below is an example of a scheduled Metadata File, Overlay File, and Playlist Fil
```yaml
libraries:
Movies:
schedule: weekly(saturday)
metadata_path:
- file: config/Movies.yml
schedule: weekly(friday)
- git: PMM/actors
schedule: weekly(saturday)
overlay_path:
- git: PMM/overlays/imdb
schedule: weekly(monday)
playlist_files:
- file: config/Playlists.yml
schedule: weekly(sunday)
```
### Asset Directory
You can define custom Asset Directories per file by adding `asset_directory` to the file call.
```yaml
libraries:
Movies:
metadata_path:
- file: config/Movies.yml
asset_directory: assets/Movies
- git: PMM/actors
asset_directory: assets/people
overlay_path:
- git: PMM/overlays/imdb
playlist_files:
- file: config/Playlists.yml
asset_directory:
- assets/playlists1
- assets/playlists2
```
## Metadata Path
The [`metadata_path`](libraries.md#metadata-path) attribute is defined under the [`libraries`](libraries) attribute in your [Configuration File](configuration).

@ -19,7 +19,8 @@ settings:
- config/assets_ahoy
```
By default [if no `asset_directory` is specified], the program will look in the same folder as your `config.yml` for a folder called `assets`.
* You can specify an Image Asset Directory per Metadata/Playlist/Overlay File when calling the file. See [Path Types](../../config/paths.md#asset-directory) for how to define them.
* By default [if no `asset_directory` is specified], the program will look in the same folder as your `config.yml` for a folder called `assets`.
## How assets are run
@ -34,7 +35,6 @@ Assets are searched for only at specific times.
show_missing_assets: false
```
## Asset Naming
The table below shows the asset folder path structures that will be searched for. There are two options for how Plex Meta Manager looks at the files inside your Asset Directories. Choose an option with the [`asset_folders` Setting Attribute](../../config/settings.md#image-asset-folders).

@ -324,8 +324,8 @@ class ConfigFile:
"assets_for_all": check_for_attribute(self.data, "assets_for_all", parent="settings", var_type="bool", default=False, save=False, do_print=False)
}
self.custom_repo = self.general["custom_repo"].replace("https://github.com/", "https://raw.githubusercontent.com/") if self.general["custom_repo"] else None
self.latest_version = util.current_version(self.version, nightly=self.general["check_nightly"])
self.check_nightly = self.general["check_nightly"]
self.latest_version = util.current_version(self.version, nightly=self.check_nightly)
self.session = requests.Session()
if not self.general["verify_ssl"]:

@ -14,9 +14,9 @@ class GitHub:
response = self.config.get_json(f"{base_url}/releases/latest")
return response["body"]
def get_develop_commits(self, dev_version):
def get_commits(self, dev_version, nightly=False):
master_sha = self.config.get_json(f"{base_url}/commits/master")["sha"]
response = self.config.get_json(f"{base_url}/commits?sha=develop")
response = self.config.get_json(f"{base_url}/commits", params={"sha": "nightly" if nightly else "develop"})
commits = []
for commit in response:
if commit["sha"] == master_sha:

@ -103,7 +103,9 @@ def current_version(version, nightly=False):
return get_version("nightly")
elif version[2] > 0:
new_version = get_version("develop")
return get_version("nightly") if new_version[2] < version[2] else new_version
if version[1] != new_version[1] or new_version[2] >= version[2]:
return new_version
return get_version("nightly")
else:
return get_version("master")
@ -125,7 +127,8 @@ def add_dict_list(keys, value, dict_map):
else:
dict_map[key] = [value]
def get_list(data, lower=False, upper=False, split=",", int_list=False):
def get_list(data, lower=False, upper=False, split=True, int_list=False):
if split is True: split = ","
if data is None: return None
elif isinstance(data, list): list_data = data
elif isinstance(data, dict): return [data]
@ -298,9 +301,13 @@ def load_files(files_to_load, method, schedule=None):
temp_vars = {}
if "template_variables" in file and file["template_variables"] and isinstance(file["template_variables"], dict):
temp_vars = file["template_variables"]
asset_directory = None
if "asset_directory" in file and file["asset_directory"] and os.path.exists(file["asset_directory"]):
asset_directory = file["asset_directory"]
asset_directory = []
if "asset_directory" in file and file["asset_directory"]:
for asset_path in get_list(file["asset_directory"], split=False):
if os.path.exists(asset_path):
asset_directory.append(asset_path)
else:
logger.error(f"Config Error: Asset Directory Does Not Exist: {asset_path}")
current = []
def check_dict(attr, name):

@ -55,7 +55,7 @@ class Webhooks:
if version[1] != latest_version[1]:
notes = self.config.GitHub.latest_release_notes()
elif version[2] and version[2] < latest_version[2]:
notes = self.config.GitHub.get_develop_commits(version[2])
notes = self.config.GitHub.get_commits(version[2], nightly=self.config.check_nightly)
self._request(self.version_webhooks, {"current": version[0], "latest": latest_version[0], "notes": notes})
def end_time_hooks(self, start_time, end_time, run_time, stats):

Loading…
Cancel
Save