From 14fabfab5a38b71b2341860136caef4225e4e2e0 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 3 Mar 2023 02:53:51 -0700 Subject: [PATCH] - Fix scheduling syntax - Delete holiday collections outside of holiday range --- .../movies_collections_awards_general.yml | 138 +++++++++++++++--- .../general/movies_collections_general.yml | 9 +- plex/pmm/templates/collections.yml | 28 +++- plex/pmm/templates/dynamic_collections.yml | 8 +- plex/pmm/tips_and_tricks.md | 4 + 5 files changed, 153 insertions(+), 34 deletions(-) diff --git a/plex/pmm/collections/general/movies_collections_awards_general.yml b/plex/pmm/collections/general/movies_collections_awards_general.yml index be876a2..26c348d 100644 --- a/plex/pmm/collections/general/movies_collections_awards_general.yml +++ b/plex/pmm/collections/general/movies_collections_awards_general.yml @@ -66,7 +66,11 @@ collections: template: { name: Award, level: "++++++" } summary: "Who will take home the trophy?" - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -77,7 +81,11 @@ collections: template: { name: Award, level: "+++++" } summary: "Who will take home the trophy?" - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -88,7 +96,11 @@ collections: template: { name: Award, level: "+++++" } summary: "Who will take home the trophy?" - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -102,7 +114,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 86654 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -110,7 +126,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 72466 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -118,7 +138,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 18269 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -126,7 +150,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 2326151 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -134,7 +162,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 2440 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -149,7 +181,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 112 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -157,7 +193,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 224513 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -165,7 +205,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 127558 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -173,7 +217,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 1812 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -181,7 +229,11 @@ collections: template: { name: ActorAward, level: "+++++", tmdb: 1620 } - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -196,7 +248,11 @@ collections: trakt_list: # TODO: NEED TO REPLACE MANUALLY - https://trakt.tv/users/jcbwoldseth/lists/oscar-race-2023 - schedule: yearly(02/01), yearly(02/20), yearly(04/01) # You have to schedule it to run again after visibility timeframe for visibility to switch back + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run again after visibility timeframe for visibility to switch back visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -211,7 +267,11 @@ collections: level: "++" } imdb_list: - https://www.imdb.com/search/title/?title_type=feature,documentary&groups=oscar_winner - schedule: yearly(02/01), yearly(03/28), yearly(04/01) # You have to schedule it to run again after visibility timeframe for visibility to switch back + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run again after visibility timeframe for visibility to switch back visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -222,7 +282,11 @@ collections: level: "++" } imdb_list: - https://www.imdb.com/search/title/?groups=best_director_winners&sort=year%2Cdesc - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) summary: The Academy Award for Best Director is one of the Academy Awards presented annually by the Academy of Motion Picture Arts and Sciences since the awards debuted in 1929. @@ -235,7 +299,11 @@ collections: level: "++" } imdb_list: - https://www.imdb.com/search/title/?groups=best_picture_winners&sort=year%2Cdesc - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) summary: The Academy Award for Best Picture is one of the Academy Awards presented annually by the Academy of Motion Picture Arts and Sciences since the awards debuted in 1929. @@ -248,7 +316,11 @@ collections: level: "++" } summary: "Previous Razzie Worst Picture winners" mdblist_list: https://mdblist.com/lists/hdlists/razzie-awards-worst-picture-winners - schedule: yearly(02/01), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/01) + - all[weekly(friday),range(02/01-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/01-03/31) visible_shared: range(02/01-03/31) @@ -259,7 +331,11 @@ collections: template: { name: Award, level: "++" } trakt_list: https://trakt.tv/users/sp1ti/lists/cannes-palme-d-or-winners - schedule: yearly(06/01), yearly(07/01) # You have to schedule it to run again after visibility timeframe for visibility to switch back + schedule: + - yearly(06/01) + - all[weekly(friday),range(06/01-06/30)] + - yearly(07/01) + # You have to schedule it to run again after visibility timeframe for visibility to switch back visible_home: range(06/01-06/30) visible_shared: range(06/01-06/30) @@ -270,7 +346,11 @@ collections: template: { name: Award, level: "++" } trakt_list: https://trakt.tv/users/fauxliege/lists/cesar-meilleur-film - schedule: yearly(03/14), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(03/14) + - all[weekly(friday),range(03/14-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(03/14-03/31) visible_shared: range(03/14-03/31) @@ -281,7 +361,11 @@ collections: template: { name: Award, level: "++" } trakt_list: https://trakt.tv/users/maxwelldeux/lists/berlin-international-film-festival-golden-bears - schedule: yearly(02/21), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/21) + - all[weekly(friday),range(02/21-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/21-03/31) visible_shared: range(02/21-03/31) @@ -292,7 +376,11 @@ collections: template: { name: Award, level: "++" } trakt_list: https://trakt.tv/users/maxwelldeux/lists/bafta-award-best-film - schedule: yearly(02/21), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/21) + - all[weekly(friday),range(02/21-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/21-03/31) visible_shared: range(02/21-03/31) @@ -303,7 +391,11 @@ collections: template: { name: Award, level: "++" } trakt_list: https://trakt.tv/users/maxwelldeux/lists/venice-film-festival-golden-lion - schedule: yearly(02/21), yearly(04/01) # You have to schedule it to run before and after visibility timeframe for visibility to switch + schedule: + - yearly(02/21) + - all[weekly(friday),range(02/21-03/31)] + - yearly(04/01) + # You have to schedule it to run before and after visibility timeframe for visibility to switch visible_home: range(02/21-03/31) visible_shared: range(02/21-03/31) diff --git a/plex/pmm/collections/general/movies_collections_general.yml b/plex/pmm/collections/general/movies_collections_general.yml index cb00618..56bf265 100644 --- a/plex/pmm/collections/general/movies_collections_general.yml +++ b/plex/pmm/collections/general/movies_collections_general.yml @@ -119,7 +119,9 @@ collections: level: "++" } summary: "Dive into the best films ever made" imdb_chart: top_movies - schedule: weekly(wednesday), weekly(sunday) + schedule: + - weekly(wednesday) + - weekly(sunday) visible_home: false visible_shared: true @@ -181,7 +183,9 @@ collections: summary: "IMDb's top movies of the 2020s" imdb_list: - https://www.imdb.com/search/title/?title_type=tv_series&release_date=2020-01-01,2029-12-31&num_votes=5000,&languages=en&sort=user_rating,desc - schedule: weekly(wednesday), weekly(sunday) + schedule: + - weekly(wednesday) + - weekly(sunday) visible_home: false visible_shared: true @@ -578,6 +582,7 @@ dynamic_collections: thanksgiving: range(11/01-11/30) christmas: range(12/01-12/31) hallmark: range(12/01-12/31) + delete_not_scheduled: true level: years: "++" valentine: "++" diff --git a/plex/pmm/templates/collections.yml b/plex/pmm/templates/collections.yml index 7001f42..346258e 100644 --- a/plex/pmm/templates/collections.yml +++ b/plex/pmm/templates/collections.yml @@ -60,7 +60,9 @@ templates: sort_title: 05_+<>_<> sync_mode: sync collection_order: custom - schedule: weekly(wednesday), weekly(sunday) + schedule: + - weekly(wednesday) + - weekly(sunday) visible_library: true url_poster: <> @@ -73,7 +75,9 @@ templates: tmdb_person: <> sort_title: 05_+<>_<> sync_mode: append - schedule: weekly(wednesday), weekly(sunday) + schedule: + - weekly(wednesday) + - weekly(sunday) visible_library: true Collection: @@ -84,7 +88,9 @@ templates: sort_title: 06_+<>_<> sync_mode: sync collection_order: custom - schedule: weekly(wednesday), weekly(sunday) + schedule: + - weekly(wednesday) + - weekly(sunday) visible_library: true url_poster: <> @@ -95,7 +101,9 @@ templates: - poster_url sort_title: 07_+<>_<> sync_mode: sync - schedule: weekly(wednesday), weekly(sunday) + schedule: + - weekly(wednesday) + - weekly(sunday) visible_library: true url_poster: <> @@ -107,7 +115,9 @@ templates: sort_title: 08_+<>_<> sync_mode: sync collection_order: custom - schedule: weekly(wednesday), weekly(sunday) + schedule: + - weekly(wednesday) + - weekly(sunday) visible_library: true url_poster: <> @@ -185,7 +195,9 @@ templates: sort_title: 11_+<>_<> sync_mode: sync collection_order: custom - schedule: weekly(wednesday), weekly(sunday) + schedule: + - weekly(wednesday) + - weekly(sunday) visible_library: true url_poster: <> @@ -195,5 +207,7 @@ templates: sort_title: 12_+<>_<> sync_mode: sync collection_order: custom - schedule: weekly(wednesday), weekly(sunday) + schedule: + - weekly(wednesday) + - weekly(sunday) visible_library: true diff --git a/plex/pmm/templates/dynamic_collections.yml b/plex/pmm/templates/dynamic_collections.yml index 57195f2..b5c8690 100644 --- a/plex/pmm/templates/dynamic_collections.yml +++ b/plex/pmm/templates/dynamic_collections.yml @@ -40,7 +40,9 @@ templates: visible_library: true visible_shared: false visible_home: false - schedule: weekly(thursday), weekly(monday) + schedule: + - weekly(thursday) + - weekly(monday) Per_Director: smart_filter: @@ -52,7 +54,9 @@ templates: visible_library: true visible_shared: false visible_home: false - schedule: weekly(friday), weekly(tuesday) + schedule: + - weekly(friday) + - weekly(tuesday) Per_Country: smart_filter: diff --git a/plex/pmm/tips_and_tricks.md b/plex/pmm/tips_and_tricks.md index 4101224..3720ee1 100644 --- a/plex/pmm/tips_and_tricks.md +++ b/plex/pmm/tips_and_tricks.md @@ -47,6 +47,10 @@ Prefix suggestions: - Save time by updating lesser-important collections and playlists less frequently: - ex. `schedule: weekly(wednesday), weekly(sunday)` - Don't need to schedule a `smart_filter` because Plex auto-updates the list itself +- Scheduling can take multiple criteria + - Ex. yearly(02/21), all[weekly(friday),range(02/21-03/31)], yearly(04/01) + - Run on Feb. 21 every year (regardless of day of week), then run every Friday between Feb. 21 and Mar. 31, then run Apr. 1 (regardless of day of week) + - Useful for awards or things that need to appear and be updated only for a certain time frame of the year ## Sorting