[22] I forgot what I was doing but cool

pull/790/head
YozoraXCII 3 years ago committed by meisnate12
parent 6cd7b0e6ba
commit 695f9f4ab3

@ -1 +1 @@
1.16.0-develop21
1.16.0-develop22

@ -64,16 +64,15 @@ dynamic_collections:
France: French
```
* Using the `addons` attribute to combine multiple `keys`, i.e. merging "MTV", "MTV2", "MTV3" and "MTV (UK)" into one "MTV Worldwide" collection.
* When doing this, individual collections will not be created for the individual MTV collections, instead they will be merged within the "MTV Worldwide" collection.
* Using the `addons` attribute to combine multiple `keys`, i.e. merging "MTV2", "MTV3" and "MTV (UK)" into one "MTV" collection.
* When doing this, individual collections will not be created for the individual MTV collections, instead they will be merged within the "MTV" collection.
```yaml
dynamic_collections:
networks:
type: network
addons:
MTV Worldwide:
- MTV
MTV:
- MTV2
- MTV3
- MTV (UK)
@ -123,6 +122,7 @@ Depending on the `type` of dynamic collection, `data` is used to specify the opt
| [`year`](#year) | Create a collection for each year found in the library | ❌ | ✅ | ✅ | ❌ | ❌ |
| [`decade`](#decade) | Create a collection for each decade found in the library | ❌ | ✅ | ❌ | ❌ | ❌ |
| [`country`](#country) | Create a collection for each country found in the library | ❌ | ✅ | ❌ | ✅ | ✅ |
| [`resolution`](#resolution) | Create a collection for each resolution found in the library | ❌ | ✅ | ❌ | ❌ | ❌ |
| [`network`](#network) | Create a collection for each network found in the library | ❌ | ❌ | ✅ | ❌ | ❌ |
| [`mood`](#mood) | Create a collection for each mood found in the library | ❌ | ❌ | ❌ | ✅ | ❌ |
| [`style`](#style) | Create a collection for each style found in the library | ❌ | ❌ | ❌ | ✅ | ❌ |
@ -1150,6 +1150,65 @@ dynamic_collections:
India: Indian
```
### Resolution
Create a collection for each resolution found in the library
<table class="dualTable colwidths-auto align-default table">
<tr>
<th><code>type</code> Option</th>
<td><code>resolution</code></td>
</tr>
<tr>
<th><code>data</code> Value</th>
<td>Not Used</td>
</tr>
<tr>
<th>Keys</th>
<td>Resolution</td>
</tr>
<tr>
<th>Key Names</th>
<td>Resolution</td>
</tr>
<tr>
<th>Default <code>title_format</code></th>
<td><code>&lt;&lt;key_name&gt;&gt; &lt;&lt;library_type&gt;&gt;s</code></td>
</tr>
<tr>
<th>Default Template</th>
<td>
```yaml
default_template:
smart_filter:
limit: 50
sort_by: title.asc
any:
resolution: <<resolution>>
```
</td>
</tr>
</table>
#### Example:
* Create a collection for each resolution found in the library
* Name the collection "[Resolution] Movies"
* Combine 480p, 576p and SD into a collection called "SD Movies"
```yaml
dynamic_collections:
Resolutions: # mapping name does not matter just needs to be unique
type: resolution
addons:
480p:
- 576p
- SD
title_override:
480p: SD Movies
```
### Network
Create a collection for each network found in the library.
@ -1355,16 +1414,15 @@ dynamic_collections:
Defines how multiple `keys` can be combined under a parent key.
For example, the `addons` attribute can be used to combine multiple `keys`, i.e. merging "MTV", "MTV2", "MTV3" and "MTV (UK)" into one "MTV Worldwide" collection.
* When doing this, individual collections will not be created for the individual MTV collections, instead they will be merged within the "MTV Worldwide" collection.
For example, the `addons` attribute can be used to combine multiple `keys`, i.e. merging "MTV2", "MTV3" and "MTV (UK)" into the "MTV" collection.
```yaml
dynamic_collections:
networks:
type: network
addons:
MTV Worldwide:
- MTV
MTV:
- MTV2
- MTV3
- MTV (UK)

@ -16,7 +16,7 @@ ms_auto = [
"trakt_user_lists", "trakt_liked_lists", "trakt_people_list"
]
auto = {
"Movie": ["tmdb_collection", "decade", "country", "director", "producer", "writer", "subtitle_language", "audio_language"] + all_auto + ms_auto,
"Movie": ["tmdb_collection", "decade", "country", "director", "producer", "writer", "subtitle_language", "audio_language", "resolution"] + all_auto + ms_auto,
"Show": ["network", "origin_country"] + all_auto + ms_auto,
"Artist": ["mood", "style", "country"] + all_auto,
"Video": ["country", "content_rating"] + all_auto
@ -281,7 +281,7 @@ class MetadataFile(DataFile):
for ck, cv in check_dict.items():
if ck not in exclude and cv not in exclude:
auto_list[ck] = cv
if auto_type in ["genre", "mood", "style", "country", "network", "year", "decade", "content_rating", "subtitle_language", "audio_language"]:
if auto_type in ["genre", "mood", "style", "country", "network", "year", "decade", "content_rating", "subtitle_language", "audio_language", "resolution"]:
search_tag = auto_type_translation[auto_type] if auto_type in auto_type_translation else auto_type
if auto_type in ["subtitle_language", "audio_language"]:
auto_list = {i.key: i.title for i in library.get_tags(search_tag) if i.title not in exclude and i.key not in exclude}
@ -290,6 +290,9 @@ class MetadataFile(DataFile):
if library.is_music:
default_template = {"smart_filter": {"limit": 50, "sort_by": "plays.desc", "any": {f"artist_{auto_type}": f"<<{auto_type}>>"}}}
default_title_format = "Most Played <<key_name>> <<library_type>>s"
elif auto_type == "resolution":
default_template = {"smart_filter": {"sort_by": "title.asc", "any": {auto_type: f"<<{auto_type}>>"}}}
default_title_format = "<<key_name>> <<library_type>>s"
else:
default_template = {"smart_filter": {"limit": 50, "sort_by": "critic_rating.desc", "any": {auto_type: f"<<{auto_type}>>"}}}
default_title_format = "Best <<library_type>>s of <<key_name>>" if auto_type in ["year", "decade"] else "Top <<key_name>> <<library_type>>s"

Loading…
Cancel
Save