[112] check image urls

pull/933/head
meisnate12 3 years ago
parent 66c23a54d2
commit 94dfe8540d

@ -1 +1 @@
1.16.5-develop111
1.16.5-develop112

@ -133,7 +133,7 @@ html_theme_options = {
("Overlay Files", "metadata/overlay"),
("Playlist Files", "metadata/playlist"),
("_divider", ),
("PMM Default Config Files", "home/guides/defaults"),
("Default Configs and Overlays", "home/guides/defaults"),
("Scheduling Guide", "home/guides/scheduling"),
("Image Asset Directory Guide", "home/guides/assets"),
("Formula 1 Metadata Guide", "home/guides/formula"),

@ -13,7 +13,7 @@ These docs are assuming you have a basic understanding of Docker concepts. One
| [Run](#run) | `-r` or `--run` | `PMM_RUN` |
| [Run Tests](#run-tests) | `-rt`, `--tests`, or `--run-tests` | `PMM_TEST` |
| [Collections Only](#collections-only) | `-co` or `--collections-only` | `PMM_COLLECTIONS_ONLY` |
| [Plsylists Only](#plsylists-only) | `-po` or `--plsylists-only` | `PMM_PLAYLISTS_ONLY` |
| [Playlists Only](#playlists-only) | `-po` or `--playlists-only` | `PMM_PLAYLISTS_ONLY` |
| [Operations](#operations) | `-op` or `--operations` | `PMM_OPERATIONS` |
| [Overlays](#overlays) | `-ov` or `--overlays` | `PMM_OVERLAYS` |
| [Run Collections](#run-collections) | `-rc` or `--run-collections` | `PMM_COLLECTIONS` |

@ -47,6 +47,8 @@ Each file has a comment block at the top showing the available `template_variabl
# Created by Yozora, Bullmoose20, & Sohjiro #
#############################################################
# Call this from your config.yml (Movie or Show) #
# If nothing is specified these are the defaults #
# #
# metadata_path: #
# - git: PMM/genre #
# template_variables: #

@ -263,20 +263,20 @@ No number search can take multiple values.
| Number Search | Description | Movie<br>Libraries | Show<br>Libraries | Music<br>Libraries |
|:----------------------|:--------------------------------------------------------------------------------------------|:------------------:|:-----------------:|:------------------:|
| `duration` | Uses the duration attribute to match using minutes<br>**Minimum:** `1` | &#9989; | &#10060; | &#10060; |
| `plays` | Uses the plays attribute to match<br>**Minimum:** `1` | &#9989; | &#9989; | &#10060; |
| `episode_plays` | Uses the Episode's plays attribute to match<br>**Minimum:** `1` | &#10060; | &#9989; | &#10060; |
| `duration` | Uses the duration attribute to match using minutes<br>**Minimum:** `0` | &#9989; | &#10060; | &#10060; |
| `plays` | Uses the plays attribute to match<br>**Minimum:** `0` | &#9989; | &#9989; | &#10060; |
| `episode_plays` | Uses the Episode's plays attribute to match<br>**Minimum:** `0` | &#10060; | &#9989; | &#10060; |
| `critic_rating` | Uses the critic rating attribute to match<br>**Range:** `0.0` - `10.0` | &#9989; | &#9989; | &#10060; |
| `audience_rating` | Uses the audience rating attribute to match<br>**Range:** `0.0` - `10.0` | &#9989; | &#9989; | &#10060; |
| `user_rating` | Uses the user rating attribute to match<br>**Range:** `0.0` - `10.0` | &#9989; | &#9989; | &#10060; |
| `episode_user_rating` | Uses the user rating attribute of the show's episodes to match<br>**Range:** `0.0` - `10.0` | &#10060; | &#9989; | &#10060; |
| `year` | Uses the year attribute to match<br>**Minimum:** `1` | &#9989; | &#9989; | &#10060; |
| `episode_year` | Uses the Episode's year attribute to match<br>**Minimum:** `1` | &#10060; | &#9989; | &#10060; |
| `album_year` | Uses the Album's year attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `album_decade` | Uses the Album's decade attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `album_plays` | Uses the Album's plays attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `track_plays` | Uses the Track's plays attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `track_skips` | Uses the Track's skips attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `year` | Uses the year attribute to match<br>**Minimum:** `0` | &#9989; | &#9989; | &#10060; |
| `episode_year` | Uses the Episode's year attribute to match<br>**Minimum:** `0` | &#10060; | &#9989; | &#10060; |
| `album_year` | Uses the Album's year attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `album_decade` | Uses the Album's decade attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `album_plays` | Uses the Album's plays attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `track_plays` | Uses the Track's plays attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `track_skips` | Uses the Track's skips attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `artist_user_rating` | Uses the Artist's user rating attribute to match<br>**Range:** `0.0` - `10.0` | &#10060; | &#10060; | &#9989; |
| `album_user_rating` | Uses the Album's user rating attribute to match<br>**Range:** `0.0` - `10.0` | &#10060; | &#10060; | &#9989; |
| `album_critic_rating` | Uses the Album's critic rating attribute to match<br>**Range:** `0.0` - `10.0` | &#10060; | &#10060; | &#9989; |

@ -231,20 +231,20 @@ No number filter can take multiple values.
| Number Search | Description | Movie<br>Libraries | Show<br>Libraries | Music<br>Libraries |
|:----------------------|:--------------------------------------------------------------------------------------------|:------------------:|:-----------------:|:------------------:|
| `duration` | Uses the duration attribute to match using minutes<br>**Minimum:** `1` | &#9989; | &#10060; | &#10060; |
| `plays` | Uses the plays attribute to match<br>**Minimum:** `1` | &#9989; | &#9989; | &#10060; |
| `episode_plays` | Uses the Episode's plays attribute to match<br>**Minimum:** `1` | &#10060; | &#9989; | &#10060; |
| `duration` | Uses the duration attribute to match using minutes<br>**Minimum:** `0` | &#9989; | &#10060; | &#10060; |
| `plays` | Uses the plays attribute to match<br>**Minimum:** `0` | &#9989; | &#9989; | &#10060; |
| `episode_plays` | Uses the Episode's plays attribute to match<br>**Minimum:** `0` | &#10060; | &#9989; | &#10060; |
| `critic_rating` | Uses the critic rating attribute to match<br>**Range:** `0.0` - `10.0` | &#9989; | &#9989; | &#10060; |
| `audience_rating` | Uses the audience rating attribute to match<br>**Range:** `0.0` - `10.0` | &#9989; | &#9989; | &#10060; |
| `user_rating` | Uses the user rating attribute to match<br>**Range:** `0.0` - `10.0` | &#9989; | &#9989; | &#10060; |
| `episode_user_rating` | Uses the user rating attribute of the show's episodes to match<br>**Range:** `0.0` - `10.0` | &#10060; | &#9989; | &#10060; |
| `year` | Uses the year attribute to match<br>**Minimum:** `1` | &#9989; | &#9989; | &#10060; |
| `episode_year` | Uses the Episode's year attribute to match<br> **Minimum:** `1` | &#10060; | &#9989; | &#10060; |
| `album_year` | Uses the Album's year attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `album_decade` | Uses the Album's decade attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `album_plays` | Uses the Album's plays attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `track_plays` | Uses the Track's plays attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `track_skips` | Uses the Track's skips attribute to match<br>**Minimum:** `1` | &#10060; | &#10060; | &#9989; |
| `year` | Uses the year attribute to match<br>**Minimum:** `0` | &#9989; | &#9989; | &#10060; |
| `episode_year` | Uses the Episode's year attribute to match<br> **Minimum:** `0` | &#10060; | &#9989; | &#10060; |
| `album_year` | Uses the Album's year attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `album_decade` | Uses the Album's decade attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `album_plays` | Uses the Album's plays attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `track_plays` | Uses the Track's plays attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `track_skips` | Uses the Track's skips attribute to match<br>**Minimum:** `0` | &#10060; | &#10060; | &#9989; |
| `artist_user_rating` | Uses the Artist's user rating attribute to match<br>**Range:** `0.0` - `10.0` | &#10060; | &#10060; | &#9989; |
| `album_user_rating` | Uses the Album's user rating attribute to match<br>**Range:** `0.0` - `10.0` | &#10060; | &#10060; | &#9989; |
| `album_critic_rating` | Uses the Album's critic rating attribute to match<br>**Range:** `0.0` - `10.0` | &#10060; | &#10060; | &#9989; |

@ -786,6 +786,10 @@ class CollectionBuilder:
def _poster(self, method_name, method_data):
if method_name == "url_poster":
image_response = self.config.get(method_data)
if image_response.status_code >= 400 or image_response.headers["Content-Type"] not in ["image/jpeg", "image/png"]:
logger.warning(f"{self.Type} Warning: No Poster Found at {method_data}")
else:
self.posters[method_name] = method_data
elif method_name == "tmdb_poster":
self.posters[method_name] = self.config.TMDb.get_movie_show_or_collection(util.regex_first_int(method_data, 'TMDb ID'), self.library.is_movie).poster_url
@ -801,6 +805,10 @@ class CollectionBuilder:
def _background(self, method_name, method_data):
if method_name == "url_background":
image_response = self.config.get(method_data)
if image_response.status_code >= 400 or image_response.headers["Content-Type"] not in ["image/jpeg", "image/png"]:
logger.warning(f"{self.Type} Warning: No Background Found at {method_data}")
else:
self.backgrounds[method_name] = method_data
elif method_name == "tmdb_background":
self.backgrounds[method_name] = self.config.TMDb.get_movie_show_or_collection(util.regex_first_int(method_data, 'TMDb ID'), self.library.is_movie).backdrop_url

Loading…
Cancel
Save