diff --git a/VERSION b/VERSION
index e564152d..0cb0ca47 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.16.5-develop103
+1.16.5-develop104
diff --git a/docs/config/operations.md b/docs/config/operations.md
index 22913f22..f98ba93b 100644
--- a/docs/config/operations.md
+++ b/docs/config/operations.md
@@ -22,7 +22,7 @@ The available attributes for the operations attribute are as follows
| `delete_collections_with_less` | Deletes every collection with less than the given number of items.
**Values:** number greater than 0 |
| `delete_unmanaged_collections` | Deletes every unmanaged collection
**Values:** `true` or `false` |
| `mass_genre_update` | Updates every item's genres in the library to the chosen site's genres
**Values:**
`tmdb` | Use TMDb for Genres |
`tvdb` | Use TVDb for Genres |
`omdb` | Use IMDb through OMDb for Genres |
`anidb` | Use AniDB Tags for Genres |
|
-| `mass_content_rating_update` | Updates every item's content rating in the library to the chosen site's content rating
**Values:** `tmdb` | Use TMDb for Genres |
`mdb` | Use MdbList for Content Ratings |
`mdb_commonsense` | Use Commonsense Rating through MDbList for Content Ratings |
`omdb` | Use IMDb through OMDb for Content Ratings |
|
+| `mass_content_rating_update` | Updates every item's content rating in the library to the chosen site's content rating
**Values:** `mdb` | Use MdbList for Content Ratings |
`mdb_commonsense` | Use Commonsense Rating through MDbList for Content Ratings |
`omdb` | Use IMDb through OMDb for Content Ratings |
|
| `mass_originally_available_update` | Updates every item's originally available date in the library to the chosen site's date
**Values:** `tmdb` | Use TMDb Release Date |
`tvdb` | Use TVDb Release Date |
`omdb` | Use IMDb Release Date through OMDb |
`mdb` | Use MdbList Release Date |
`anidb` | Use AniDB Release Date |
|
| `mass_audience_rating_update`/
`mass_critic_rating_update` | Updates every item's audience/critic rating in the library to the chosen site's rating
**Values:** `tmdb` | Use TMDb Rating |
`omdb` | Use IMDbRating through OMDb |
`mdb` | Use MdbList Score |
`mdb_imdb` | Use IMDb Rating through MDbList |
`mdb_metacritic` | Use Metacritic Rating through MDbList |
`mdb_metacriticuser` | Use Metacritic User Rating through MDbList |
`mdb_trakt` | Use Trakt Rating through MDbList |
`mdb_tomatoes` | Use Rotten Tomatoes Rating through MDbList |
`mdb_tomatoesaudience` | Use Rotten Tomatoes Audience Rating through MDbList |
`mdb_tmdb` | Use TMDb Rating through MDbList |
`mdb_letterboxd` | Use Letterboxd Rating through MDbList |
`anidb_rating` | Use AniDB Rating |
`anidb_average` | Use AniDB Average |
|
| `mass_imdb_parental_labels` | Updates every item's labels in the library to match the IMDb Parental Guide
**Values** `with_none` or `without_none` |
diff --git a/docs/metadata/details/setting.md b/docs/metadata/details/setting.md
index 38f0da38..c82f7d62 100644
--- a/docs/metadata/details/setting.md
+++ b/docs/metadata/details/setting.md
@@ -30,5 +30,5 @@ All the following attributes serve various functions as how the collection/playl
| `changes_webhooks` | **Description:** Used to specify a collection/playlist changes webhook for just this collection/playlist.
**Values:** List of webhooks |
| `sync_to_trakt_list` | **Description:** Used to specify a trakt list you want the collection/playlist synced to.
**Values:** Trakt List Slug you want to sync to |
| `sync_missing_to_trakt_list` | **Description:** Used to also sync missing items to the Trakt List specified by `sync_to_trakt_list`.
**Values:** `ture` or `false` |
-| `allowed_library_types` | **Description:** Used to specify the types of libraries that this definition can work with.
Multiple can be used for one definition as a list or comma separated string.
**Values:** `movie`, `show`, or `artist` |
-
+| `allowed_library_types` | **Description:** Used to specify the types of libraries that this definition can work with.
Multiple can be used for one definition as a list or comma separated string. One `false` will cause it to fail.
**Values:** `movie`, `show`, `artist`, `true`, `false` |
+| `default_percent` | **Description:** Used to declare the default percent for `episodes`, `seasons`, `tracks`, and `albums` [special filters](../filters.md#special-filters). Default is 50.
**Values:** Integer between 1 and 100 |
diff --git a/docs/metadata/filters.md b/docs/metadata/filters.md
index 03da904c..a5960cf8 100644
--- a/docs/metadata/filters.md
+++ b/docs/metadata/filters.md
@@ -40,7 +40,7 @@ String filters can take multiple values **only as a list**.
| `filepath` | Uses the item's filepath to match | ✅ | ✅1 | ✅1 | ✅ | ✅1 | ✅1 | ✅ |
| `audio_track_title` | Uses the audio track titles to match | ✅ | ✅1 | ✅1 | ✅ | ✅1 | ✅1 | ✅ |
-1 Filters using the special `episodes`/`tracks` filters with the default percent.
+1 Filters using the special `episodes`/`tracks` [filter](#special-filters) with the [default percent](details/setting).
## Tag Filters
@@ -82,7 +82,8 @@ Tag filters can take multiple values as a **list or a comma-separated string**.
| `tmdb_keyword`2 | Uses the keyword from TMDb to match | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| `origin_country`2 | Uses TMDb origin country [ISO 3166-1 alpha-2 codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to match
Example: `origin_country: us` | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
-1 Filters using the special `episodes` filter with the default percent.
+1 Filters using the special `episodes` [filter](#special-filters) with the [default percent](details/setting).
+
2 Also filters out missing movies/shows from being added to Radarr/Sonarr. These Values also cannot use the `count` modifiers.
## Boolean Filters
@@ -97,7 +98,7 @@ Boolean Filters have no modifiers.
| `has_dolby_vision` | Matches every item that has or does not have a dolby vision | ✅ | ✅1 | ✅1 | ✅ | ❌ | ❌ | ❌ |
| `has_overlay` | Matches every item that has or does not have an overlay | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
-1 Filters using the special `episodes` filter with the default percent.
+1 Filters using the special `episodes` [filter](#special-filters) with the [default percent](details/setting).
## Date Filters
diff --git a/modules/builder.py b/modules/builder.py
index a0c914f6..0b2bf0d2 100644
--- a/modules/builder.py
+++ b/modules/builder.py
@@ -44,7 +44,7 @@ ignored_details = [
]
details = [
"ignore_ids", "ignore_imdb_ids", "server_preroll", "changes_webhooks", "collection_filtering", "collection_mode", "limit", "url_theme",
- "file_theme", "minimum_items", "label", "album_sorting", "cache_builders", "tmdb_region"
+ "file_theme", "minimum_items", "label", "album_sorting", "cache_builders", "tmdb_region", "default_percent"
] + boolean_details + scheduled_boolean + string_details
collectionless_details = ["collection_order", "plex_collectionless", "label", "label_sync_mode", "test"] + \
poster_details + background_details + summary_details + string_details
@@ -145,18 +145,18 @@ custom_sort_builders = [
episode_parts_only = ["plex_pilots"]
overlay_only = ["overlay", "suppress_overlays"]
overlay_attributes = [
- "filters", "limit", "show_missing", "save_report", "missing_only_released", "minimum_items", "cache_builders", "tmdb_region"
+ "filters", "limit", "show_missing", "save_report", "missing_only_released", "minimum_items", "cache_builders", "tmdb_region", "default_percent"
] + all_builders + overlay_only
parts_collection_valid = [
"filters", "plex_all", "plex_search", "trakt_list", "trakt_list_details", "collection_filtering", "collection_mode", "label", "visible_library", "limit",
"visible_home", "visible_shared", "show_missing", "save_report", "missing_only_released", "server_preroll", "changes_webhooks",
"item_lock_background", "item_lock_poster", "item_lock_title", "item_refresh", "item_refresh_delay", "imdb_list", "cache_builders",
- "url_theme", "file_theme", "item_label"
+ "url_theme", "file_theme", "item_label", "default_percent"
] + episode_parts_only + summary_details + poster_details + background_details + string_details
playlist_attributes = [
"filters", "name_mapping", "show_filtered", "show_missing", "save_report",
"missing_only_released", "only_filter_missing", "delete_below_minimum", "ignore_ids", "ignore_imdb_ids",
- "server_preroll", "changes_webhooks", "minimum_items", "cache_builders"
+ "server_preroll", "changes_webhooks", "minimum_items", "cache_builders", "default_percent"
] + custom_sort_builders + summary_details + poster_details + radarr_details + sonarr_details
music_attributes = [
"non_item_remove_label", "item_label", "collection_filtering", "item_lock_background", "item_lock_poster", "item_lock_title",
@@ -838,6 +838,8 @@ class CollectionBuilder:
self.limit = util.parse(self.Type, method_name, method_data, datatype="int", minimum=1)
elif method_name == "cache_builders":
self.details[method_name] = util.parse(self.Type, method_name, method_data, datatype="int", minimum=0)
+ elif method_name == "default_percent":
+ self.default_percent = util.parse(self.Type, method_name, method_data, datatype="int", minimum=1, maximum=100)
elif method_name == "server_preroll":
self.server_preroll = util.parse(self.Type, method_name, method_data)
elif method_name == "ignore_ids":
diff --git a/modules/cache.py b/modules/cache.py
index 9b7ca55f..f60646bc 100644
--- a/modules/cache.py
+++ b/modules/cache.py
@@ -25,6 +25,7 @@ class Cache:
cursor.execute("DROP TABLE IF EXISTS mdb_data")
cursor.execute("DROP TABLE IF EXISTS omdb_data")
cursor.execute("DROP TABLE IF EXISTS omdb_data2")
+ cursor.execute("DROP TABLE IF EXISTS tvdb_data")
cursor.execute(
"""CREATE TABLE IF NOT EXISTS guids_map (
key INTEGER PRIMARY KEY,
@@ -164,7 +165,7 @@ class Cache:
expiration_date TEXT)"""
)
cursor.execute(
- """CREATE TABLE IF NOT EXISTS tvdb_data (
+ """CREATE TABLE IF NOT EXISTS tvdb_data2 (
key INTEGER PRIMARY KEY,
tvdb_id INTEGER UNIQUE,
type TEXT,
@@ -573,7 +574,7 @@ class Cache:
with sqlite3.connect(self.cache_path) as connection:
connection.row_factory = sqlite3.Row
with closing(connection.cursor()) as cursor:
- cursor.execute("SELECT * FROM tvdb_data WHERE tvdb_id = ? and type = ?", (tvdb_id, "movie" if is_movie else "show"))
+ cursor.execute("SELECT * FROM tvdb_data2 WHERE tvdb_id = ? and type = ?", (tvdb_id, "movie" if is_movie else "show"))
row = cursor.fetchone()
if row:
tvdb_dict["tvdb_id"] = int(row["tvdb_id"]) if row["tvdb_id"] else 0
@@ -594,8 +595,8 @@ class Cache:
with sqlite3.connect(self.cache_path) as connection:
connection.row_factory = sqlite3.Row
with closing(connection.cursor()) as cursor:
- cursor.execute("INSERT OR IGNORE INTO tvdb_data(tvdb_id, type) VALUES(?, ?)", (obj.tvdb_id, "movie" if obj.is_movie else "show"))
- update_sql = "UPDATE tvdb_data SET title = ?, summary = ?, poster_url = ?, background_url = ?, " \
+ cursor.execute("INSERT OR IGNORE INTO tvdb_data2(tvdb_id, type) VALUES(?, ?)", (obj.tvdb_id, "movie" if obj.is_movie else "show"))
+ update_sql = "UPDATE tvdb_data2 SET title = ?, summary = ?, poster_url = ?, background_url = ?, " \
"release_date = ?, genres = ?, expiration_date = ? WHERE tvdb_id = ? AND type = ?"
cursor.execute(update_sql, (
obj.title, obj.summary, obj.poster_url, obj.background_url, obj.release_date.strftime("%Y-%m-%d") if obj.release_date else None,
diff --git a/modules/config.py b/modules/config.py
index a65290c5..91342233 100644
--- a/modules/config.py
+++ b/modules/config.py
@@ -34,7 +34,7 @@ logger = util.logger
sync_modes = {"append": "Only Add Items to the Collection or Playlist", "sync": "Add & Remove Items from the Collection or Playlist"}
mass_genre_options = {"tmdb": "Use TMDb Metadata", "omdb": "Use IMDb Metadata through OMDb", "tvdb": "Use TVDb Metadata", "anidb": "Use AniDB Tag Metadata"}
-mass_content_options = {"tmdb": "Use TMDb Metadata", "omdb": "Use IMDb Metadata through OMDb", "mdb": "Use MdbList Metadata", "mdb_commonsense": "Use Commonsense Rating through MDbList"}
+mass_content_options = {"omdb": "Use IMDb Metadata through OMDb", "mdb": "Use MdbList Metadata", "mdb_commonsense": "Use Commonsense Rating through MDbList"}
mass_available_options = {"tmdb": "Use TMDb Metadata", "omdb": "Use IMDb Metadata through OMDb", "mdb": "Use MdbList Metadata", "tvdb": "Use TVDb Metadata", "anidb": "Use AniDB Metadata"}
imdb_label_options = {"with_none": "Add IMDb Parental Labels including None", "without_none": "Add IMDb Parental Labels including None"}
mass_rating_options = {
diff --git a/modules/operations.py b/modules/operations.py
index 8743102f..6d43913c 100644
--- a/modules/operations.py
+++ b/modules/operations.py
@@ -335,8 +335,6 @@ class Operations:
new_rating = mdb_item.content_rating if mdb_item.content_rating else None
elif mdb_item and self.library.mass_content_rating_update == "mdb_commonsense":
new_rating = mdb_item.commonsense if mdb_item.commonsense else None
- elif tmdb_item and self.library.mass_content_rating_update == "tmdb":
- new_rating = tmdb_item.content_rating if tmdb_item.content_rating else None
else:
raise Failed
if new_rating is None: