From 5b270dc41a9529ca2c0e56142d23c92c54c4e593 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Fri, 1 Apr 2022 02:39:23 -0400 Subject: [PATCH] finishing touches --- VERSION | 2 +- docs/conf.py | 1 + docs/config/trakt.md | 6 ++- docs/config/trakt.png | Bin 0 -> 3068 bytes docs/home/guides/formula.md | 65 +++++++++++++++++++++++++++++++++ docs/metadata/metadata/show.md | 2 +- plex_meta_manager.py | 2 +- 7 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 docs/config/trakt.png diff --git a/VERSION b/VERSION index c5a29148..c807441c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.2-develop48 +1.16.3 diff --git a/docs/conf.py b/docs/conf.py index 7c392ffa..8bdf7fb4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -130,6 +130,7 @@ html_theme_options = { ("_divider", ), ("Scheduling Guide", "home/guides/scheduling"), ("Image Asset Directory Guide", "home/guides/assets"), + ("Formula 1 Metadata Guide", "home/guides/formula"), ("_divider", ), ("Discord Server", "https://discord.gg/NfH6mGFuAB", True), ("Sponsor", "https://github.com/sponsors/meisnate12", True), diff --git a/docs/config/trakt.md b/docs/config/trakt.md index 1f635dbc..05d912de 100644 --- a/docs/config/trakt.md +++ b/docs/config/trakt.md @@ -33,7 +33,9 @@ trakt: 3. Enter `urn:ietf:wg:oauth:2.0:oob` for `Redirect uri`. 4. Click the `SAVE APP` button. 5. Record the `Client ID` and `Client Secret` as `client_id` and `client_secret` in your Configuration File. -6. Navigate to `https://trakt.tv/oauth/authorize?response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob&client_id=<>` replacing `<>` with your Client ID. -7. Record the `PIN` as `pin` in your Configuration File. +6. Click the Green Authorize Button next to the Redirect URI + + ![Trakt Authorize](trakt.png) +8. Record the `PIN` as `pin` in your Configuration File. * Run the script shortly after obtaining your pin I don't know if it expires at any point or not. \ No newline at end of file diff --git a/docs/config/trakt.png b/docs/config/trakt.png new file mode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FK^{L=77jM)YHR>1(8 z>00Ye*Ht3)wZrY7Nv?s7)~`G_!@I8D)0Ak_SqWkj%g9cHB!D;RR z-!l)obX&4)iWh$#cl`y|tjqIRikumhO!Va*tMHgFb+|vygOg8-Q%;TxP5>OtNcH4= zxFw?e4kZji}HK_G%W6OiIyn z9pg`Lodb7IS4)qPPWq~g;k|lQk0zcuuTiDxk>^5SCaI0;FTdAD5>QM*8PvWFf_c@hf-c>px3sSzMn5CX#@A#(k&whGWD8Zf0n2#Z09Urv<61oc3S6!(b zh2;9*jH(EC8KxTy-Fm_V?GFkmTnYKID!lzyWRK+JsCiC|hlv3925*D4W;9UoL@g#7 zEghp}nuhost!%0A6ZIjG-qbo3#hc_2+br1z7|AW9Q9T&# zvi7Z{I-n1~clz9)`g;($q;Yb5yo=&2@n%KGnbuw1(BB62xB2#wf2f3k=`2-!v6mM< zW0QwjKfJbRSfQvnmp6Ov+zt=rYbF%qsf|^3L;)ZNH4mL?k&DyY8^y;IEZVMFDWYuc z?IYRV4<<*c$Pjqf_yRw?^j&I8)k@!HTEBk!N`h4ine$Q!-^zlWc)eFo%d6J-oNotB zX(FdIFNRfnOsdwt<8Dx>?q^6%swCnEly**4GBw)1XM*>O_h=qrQA}IsPQW`u8XHe; zfY9i+Q-^TACeVIEDci=86iBu75Y2wfxqtkJbEl7FPJn_h{sZ^^{bK(Cj(4t*4-Y_| U_tV3UsUD>B!0>*F=F`xB0n(-*O#lD@ literal 0 HcmV?d00001 diff --git a/docs/home/guides/formula.md b/docs/home/guides/formula.md index 1e042e54..1d965a14 100644 --- a/docs/home/guides/formula.md +++ b/docs/home/guides/formula.md @@ -1,2 +1,67 @@ # Formula 1 Metadata Guide +This is a guide for setting up Formula 1 in Plex using the `f1_season` metadata attribute. + +Most of this guide is taken from a reddit [post](https://www.reddit.com/r/PleX/comments/tdzp8x/formula_1_library_with_automatic_metadata/) written by /u/Toastjuh. + +## Folder structure + +Let's start with the basics: + +* Every Formula 1 season will be a TV Show in Plex. Season 2001, Season 2002, etc. +* Every race will be a Season in Plex. Season 1 will be the Australian GP, Season 2 will be the Bahrain GP etc. +* Every session will be an Episode in Plex. Episode 1 will be Free Practice 1, Episode 2 will be Free Practice 2 etc. + +The folder format is like this: +``` +Formula -> Library Folder +├── Season 2018 -> Folder for each F1 Season +│ ├── 01 - Australian GP -> Folder for each Race in a season +│ ├── 01x10 - Australian GP - Highlights.mkv +│ ├── 01x01 - Australian GP - Free Practice 1.mkv +│ ├── 01x02 - Australian GP - Free Practice 2.mkv +│ ├── 01x03 - Australian GP - Free Practice 3.mkv +│ ├── 01x04 - Australian GP - Pre-Qualifying Buildup.mkv +│ ├── 01x05 - Australian GP - Qualifying Session.mkv +│ ├── 01x06 - Australian GP - Post-Qualyfing Analysis.mkv +│ ├── 01x07 - Australian GP - Pre-Race Buildup.mkv +│ ├── 01x08 - Australian GP - Race Session.mkv +│ ├── 01x09 - Australian GP - Post-Race Analysis.mkv +│ ├── 01x10 - Australian GP - Highlights.mkv +│ ├── 02 - Bahrein GP +│ ├── 01x10 - Bahrein GP - Highlights.mkv +│ ├── 01x01 - Bahrein GP - Free Practice 1.mkv +│ ├── 01x02 - Bahrein GP - Free Practice 2.mkv +│ ├── 01x03 - Bahrein GP - Free Practice 3.mkv +│ ├── 01x04 - Bahrein GP - Pre-Qualifying Buildup.mkv +│ ├── 01x05 - Bahrein GP - Qualifying Session.mkv +│ ├── 01x06 - Bahrein GP - Post-Qualyfing Analysis.mkv +│ ├── 01x07 - Bahrein GP - Pre-Race Buildup.mkv +│ ├── 01x08 - Bahrein GP - Race Session.mkv +│ ├── 01x09 - Bahrein GP - Post-Race Analysis.mkv +│ ├── 01x10 - Bahrein GP - Highlights.mkv +``` + +What matters for plex and for pmm. +* The show name can be whatever you want it to be but the pre created metadata file will only work if you use just the year numbers. +* The season folder can be called whatever you want as long as plex scans it in with the Season Number matching the race number. +* The episodes must follow plex's naming convention to have them scanned in properly but in order for PMM to update the metadata the files need to be specifically name like above. + +## Metadata File + +```yaml +metadata: + Season 2021: + f1_season: 2021 + round_prefix: true + Season 2020: + f1_season: 2020 + round_prefix: true +``` + +* Add `round_prefix: true` to have the race number appended to the beginning of the Race Name. +* Add `shorten_gp: true` to shorten `Grand Prix` to `GP` in all titles. + +Add an entry for every season you want to set the metadata for. The name needs to correspond with the name the season has in Plex! + +The posters of races you can get from https://www.eventartworks.de/ diff --git a/docs/metadata/metadata/show.md b/docs/metadata/metadata/show.md index b7c89284..14b7e8ea 100644 --- a/docs/metadata/metadata/show.md +++ b/docs/metadata/metadata/show.md @@ -86,7 +86,7 @@ The available attributes for editing shows, seasons, and episodes are as follows | `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 | ✅ | ❌ | ❌ | +| `f1_season` | F1 Season Year to make the Show represent a Season of F1 Races. See [Formula 1 Metadata Guide](../../home/guides/formula) for more information. | ✅ | ❌ | ❌ | | `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 | ✅ | ❌ | ❌ | diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 77ae0116..ae03672f 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -940,7 +940,7 @@ def run_collection(config, library, metadata, requested_collections): library.status[mapping_name]["sonarr"] += sonarr_add valid = True - if builder.build_collection and ( + if builder.build_collection and not builder.blank_collection and ( (builder.smart_url and len(library.get_filter_items(builder.smart_url)) < builder.minimum) or (not builder.smart_url and len(builder.added_items) + builder.beginning_count < builder.minimum) ):