From c30a731da8d6abb867c64a69dfc141046b7c1048 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 21 Mar 2022 21:50:53 -0400 Subject: [PATCH] [16] formula docs --- VERSION | 2 +- docs/config/operations.md | 2 +- docs/home/guides/formula.md | 2 ++ docs/metadata/metadata/show.md | 21 ++++++++++++--------- modules/cache.py | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 docs/home/guides/formula.md diff --git a/VERSION b/VERSION index e01ce29f..e8e3f964 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.2-develop15 +1.16.2-develop16 diff --git a/docs/config/operations.md b/docs/config/operations.md index 0eb753c3..2fff48d3 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 then 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:**
`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:**
`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_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/home/guides/formula.md b/docs/home/guides/formula.md new file mode 100644 index 00000000..1e042e54 --- /dev/null +++ b/docs/home/guides/formula.md @@ -0,0 +1,2 @@ +# Formula 1 Metadata Guide + diff --git a/docs/metadata/metadata/show.md b/docs/metadata/metadata/show.md index 31895133..b7c89284 100644 --- a/docs/metadata/metadata/show.md +++ b/docs/metadata/metadata/show.md @@ -79,15 +79,18 @@ The available attributes for editing shows, seasons, and episodes are as follows ### Special Attributes -| Attribute | Values | Shows | Seasons | Episodes | -|:-------------|:-------------------------------------------------------------------------------------------------|:--------:|:--------:|:--------:| -| `title` | Title if different from the mapping value useful when you have multiple shows with the same name | ✅ | ✅ | ✅ | -| `alt_title` | Alternative title to look for | ✅ | ❌ | ❌ | -| `year` | Year of show for better identification | ✅ | ❌ | ❌ | -| `tmdb_show` | TMDb Show ID to use for metadata useful for miniseries that have been compiled into a movie | ✅ | ❌ | ❌ | -| `tmdb_movie` | TMDb Movie ID to use for metadata useful for movies that have been split into segments | ✅ | ❌ | ❌ | -| `seasons` | Mapping to define Seasons | ✅ | ❌ | ❌ | -| `episodes` | Mapping to define Episodes | ❌ | ✅ | ❌ | +| Attribute | Values | Shows | Seasons | Episodes | +|:---------------|:--------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|:--------:|:--------:| +| `title` | Title if different from the mapping value useful when you have multiple shows with the same name | ✅ | ✅ | ✅ | +| `alt_title` | Alternative title to look for | ✅ | ❌ | ❌ | +| `year` | Year of show for better identification | ✅ | ❌ | ❌ | +| `tmdb_show` | TMDb Show ID to use for metadata useful for miniseries that have been compiled into a movie | ✅ | ❌ | ❌ | +| `tmdb_movie` | TMDb Movie ID to use for metadata useful for movies that have been split into segments | ✅ | ❌ | ❌ | +| `f1_season` | F1 Season Year to make the Show represent a Season of F1 Races | ✅ | ❌ | ❌ | +| `round_prefix` | Used only with `f1_season` to add the round as a prefix to the Season (Race) Titles i.e. `Australian Grand Prix` --> `01 - Australian Grand Prix` | ✅ | ❌ | ❌ | +| `shorten_gp` | Used only with `f1_season` to shorten `Grand Prix` to `GP` in the Season (Race) Titles i.e. `Australian Grand Prix` --> `Australian GP` | ✅ | ❌ | ❌ | +| `seasons` | Mapping to define Seasons | ✅ | ❌ | ❌ | +| `episodes` | Mapping to define Episodes | ❌ | ✅ | ❌ | * YAML files cannot have two items with the same mapping name so if you have two shows with the same name you would change the mapping values to whatever you want. Then use the `title` attribute to specify the real title and use the `year` attribute to specify which of the multiple shows to choose. ```yaml diff --git a/modules/cache.py b/modules/cache.py index 91373729..173fca08 100644 --- a/modules/cache.py +++ b/modules/cache.py @@ -773,7 +773,7 @@ class Cache: with sqlite3.connect(self.cache_path) as connection: connection.row_factory = sqlite3.Row with closing(connection.cursor()) as cursor: - cursor.excute("DELETE FROM ergast_race WHERE season = ?", (season,)) + cursor.execute("DELETE FROM ergast_race WHERE season = ?", (season,)) cursor.executemany("INSERT OR IGNORE INTO ergast_race(season, round) VALUES(?, ?)", [(r.season, r.round) for r in races]) cursor.executemany("UPDATE ergast_race SET name = ?, date = ?, expiration_date = ? WHERE season = ? AND round = ?", [(r.name, r.date.strftime("%Y-%m-%d") if r.date else None,