mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-25 22:10:22 +00:00
[27] add versions filter
This commit is contained in:
parent
cca75cb264
commit
693ae72067
6 changed files with 23 additions and 19 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.17.3-develop26
|
||||
1.17.3-develop27
|
||||
|
|
|
@ -155,20 +155,21 @@ Number filters can **NOT** take multiple values.
|
|||
|
||||
### Attribute
|
||||
|
||||
| Number Filters | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Track |
|
||||
|:------------------------------|:---------------------------------------------------------------------|:-------:|:-------------------:|:-------------------:|:--------:|:--------:|:--------:|:--------:|
|
||||
| `year` | Uses the year attribute to match<br>minimum: `1` | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
|
||||
| `tmdb_year`<sup>2</sup> | Uses the year on TMDb to match<br>minimum: `1` | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
||||
| `critic_rating` | Uses the critic rating attribute to match<br>`0.0` - `10.0` | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
|
||||
| `audience_rating` | Uses the audience rating attribute to match<br> `0.0` - `10.0` | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
|
||||
| `user_rating` | Uses the user rating attribute to match<br>`0.0` - `10.0` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| `tmdb_vote_count`<sup>2</sup> | Uses the tmdb vote count to match<br>minimum: `1` | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
||||
| `plays` | Uses the plays attribute to match<br>minimum: `1` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| `duration` | Uses the duration attribute to match using minutes<br>minimum: `0.0` | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
|
||||
| `channels` | Uses the audio channels attribute to match<br>minimum: `0` | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ | ❌ | ❌ | ❌ |
|
||||
| `height` | Uses the height attribute to match<br>minimum: `0` | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ | ❌ | ❌ | ❌ |
|
||||
| `width` | Uses the width attribute to match<br>minimum: `0` | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ | ❌ | ❌ | ❌ |
|
||||
| `aspect` | Uses the aspect attribute to match<br>minimum: `0.0` | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ | ❌ | ❌ | ❌ |
|
||||
| Number Filters | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Track |
|
||||
|:------------------------------|:---------------------------------------------------------------------|:-------:|:-------------------:|:-------------------:|:--------:|:-------------------:|:-------------------:|:--------:|
|
||||
| `year` | Uses the year attribute to match<br>minimum: `1` | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
|
||||
| `tmdb_year`<sup>2</sup> | Uses the year on TMDb to match<br>minimum: `1` | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
||||
| `critic_rating` | Uses the critic rating attribute to match<br>`0.0` - `10.0` | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
|
||||
| `audience_rating` | Uses the audience rating attribute to match<br> `0.0` - `10.0` | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
|
||||
| `user_rating` | Uses the user rating attribute to match<br>`0.0` - `10.0` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| `tmdb_vote_count`<sup>2</sup> | Uses the tmdb vote count to match<br>minimum: `1` | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
||||
| `plays` | Uses the plays attribute to match<br>minimum: `1` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| `duration` | Uses the duration attribute to match using minutes<br>minimum: `0.0` | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
|
||||
| `channels` | Uses the audio channels attribute to match<br>minimum: `0` | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ | ❌ | ❌ | ❌ |
|
||||
| `height` | Uses the height attribute to match<br>minimum: `0` | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ | ❌ | ❌ | ❌ |
|
||||
| `width` | Uses the width attribute to match<br>minimum: `0` | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ | ❌ | ❌ | ❌ |
|
||||
| `aspect` | Uses the aspect attribute to match<br>minimum: `0.0` | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ | ❌ | ❌ | ❌ |
|
||||
| `versions` | Uses the number of versions found to match<br>minimum: `0` | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅ |
|
||||
|
||||
<sup>1</sup> Filters using the special `episodes` [filter](#special-filters) with the [default percent](details/setting).
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ There are multiple Special Text Variables that can be used when formatting the t
|
|||
| `<<episode_count>>`: Number of Episodes (`1`)<br>`<<episode_countW>>`: Number of Episodes As Words (`One`)<br>`<<episode_count0>>`: Number of Episodes With 10s Padding (`01`)<br>`<<episode_count00>>`: Number of Episodes With 100s Padding (`001`) | ❌ | ✅ | ✅ | ❌ |
|
||||
| `<<season_number>>`: Season Number (`1`)<br>`<<season_numberW>>`: Season Number As Words (`One`)<br>`<<season_number0>>`: Season Number With 10s Padding (`01`)<br>`<<season_number00>>`: Season Number With 100s Padding (`001`) | ❌ | ❌ | ✅ | ✅ |
|
||||
| `<<episode_number>>`: Episode Number (`1`)<br>`<<episode_numberW>>`: Episode Number As Words (`One`)<br>`<<episode_number0>>`: Episode Number With 10s Padding (`01`)<br>`<<episode_number00>>`: Episode Number With 100s Padding (`001`) | ❌ | ❌ | ❌ | ✅ |
|
||||
| `<<versions>>`: Number of Versions of the Item (`1`)<br>`<<versionsW>>`: Number of Versions of the Item As Words (`One`)<br>`<<versions0>>`: Number of Versions of the Item With 10s Padding (`01`)<br>`<<versions00>>`: Number of Versions of the Item With 100s Padding (`001`) | ❌ | ✅ | ✅ | ✅ |
|
||||
| `<<versions>>`: Number of Versions of the Item (`1`)<br>`<<versionsW>>`: Number of Versions of the Item As Words (`One`)<br>`<<versions0>>`: Number of Versions of the Item With 10s Padding (`01`)<br>`<<versions00>>`: Number of Versions of the Item With 100s Padding (`001`) | ✅ | ❌ | ❌ | ✅ |
|
||||
| `<<runtime>>`: Complete Runtime of the Item in minutes (`150`)<br>`<<runtimeH>>`: Hours in runtime of the Item (`2`)<br>`<<runtimeM>>`: Minutes remaining in the hour in the runtime of the Item (`30`) | ✅ | ❌ | ❌ | ✅ |
|
||||
| `<<bitrate>>`: Bitrate of the first media file for an item.<br>`<<bitrateH>>`: Bitrate of the media file with the highest bitrate<br>`<<bitrateL>>`: Bitrate of the media file with the lowest bitrate | ✅ | ❌ | ❌ | ✅ |
|
||||
| `<<originally_available>>`: Original Available Date of the Item<br>`<<originally_available[FORMAT]>>`: Original Available Date of the Item in the given format. [Format Options](https://strftime.org/) | ✅ | ✅ | ❌ | ✅ |
|
||||
|
|
|
@ -73,10 +73,10 @@ discover_status = {
|
|||
}
|
||||
sub_filters = [
|
||||
"filepath", "audio_track_title", "resolution", "audio_language", "subtitle_language", "has_dolby_vision",
|
||||
"channels", "height", "width", "aspect", "audio_codec", "audio_profile", "video_codec", "video_profile"
|
||||
"channels", "height", "width", "aspect", "audio_codec", "audio_profile", "video_codec", "video_profile", "versions"
|
||||
]
|
||||
filters_by_type = {
|
||||
"movie_show_season_episode_artist_album_track": ["title", "summary", "collection", "has_collection", "added", "last_played", "user_rating", "plays", "filepath", "label", "audio_track_title"],
|
||||
"movie_show_season_episode_artist_album_track": ["title", "summary", "collection", "has_collection", "added", "last_played", "user_rating", "plays", "filepath", "label", "audio_track_title", "versions"],
|
||||
"movie_show_season_episode_album_track": ["year"],
|
||||
"movie_show_season_episode_artist_album": ["has_overlay"],
|
||||
"movie_show_season_episode": ["resolution", "audio_language", "subtitle_language", "has_dolby_vision", "channels", "height", "width", "aspect", "audio_codec", "audio_profile", "video_codec", "video_profile"],
|
||||
|
@ -120,7 +120,7 @@ date_filters = ["release", "added", "last_played", "first_episode_aired", "last_
|
|||
date_modifiers = ["", ".not", ".before", ".after", ".regex"]
|
||||
number_filters = [
|
||||
"year", "tmdb_year", "critic_rating", "audience_rating", "user_rating", "tmdb_vote_count", "plays", "duration",
|
||||
"channels", "height", "width", "aspect"]
|
||||
"channels", "height", "width", "aspect", "versions"]
|
||||
number_modifiers = ["", ".not", ".gt", ".gte", ".lt", ".lte"]
|
||||
special_filters = [
|
||||
"history", "episodes", "seasons", "albums", "tracks", "original_language", "original_language.not",
|
||||
|
|
|
@ -762,6 +762,7 @@ class MetadataFile(DataFile):
|
|||
col["test"] = True
|
||||
if collection_title in sync:
|
||||
sync.pop(collection_title)
|
||||
col_names.append(collection_title)
|
||||
self.collections[collection_title] = col
|
||||
if other_name and not other_keys:
|
||||
logger.warning(f"Config Warning: Other Collection {other_name} not needed")
|
||||
|
|
|
@ -1451,6 +1451,8 @@ class Plex(Library):
|
|||
attr = getattr(media, filter_actual)
|
||||
if attr and attr > test_number:
|
||||
test_number = attr
|
||||
elif filter_attr == "versions":
|
||||
test_number = len(item.media)
|
||||
elif filter_attr == "audio_language":
|
||||
for media in item.media:
|
||||
for part in media.parts:
|
||||
|
|
Loading…
Reference in a new issue