[14] restore flixpatrol top 10

pull/1667/head
meisnate12 1 year ago
parent 67540f993d
commit 371e28399f

@ -1 +1 @@
1.19.1-develop13 1.19.1-develop14

@ -0,0 +1,64 @@
##############################################################################
# FlixPatrol Charts Collections #
# Created by Yozora, Bullmoose20, anon_fawkes, & Sohjiro #
# EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL #
# https://metamanager.wiki/en/latest/defaults/chart/flixpatrol.html #
##############################################################################
external_templates:
pmm: templates
template_variables:
collection_section: "020"
pre: "_#"
templates:
flixpatrol:
default:
location: world
location_<<key>>: <<location>>
limit: 10
limit_<<key>>: <<limit>>
conditionals:
actual_location:
default: <<location_<<key>>>>
conditions:
- key: apple
value: world
limit: <<limit>>
flixpatrol_top:
platform: <<platform>>
location: <<actual_location>>
limit: <<limit_<<key>>>>
dynamic_collections:
FlixPatrol:
type: custom
data:
netflix: Netflix
disney: Disney+
max: Max
hulu: Hulu
paramount: Paramount+
prime: Prime Video
apple: Apple TV+
title_format: <<key_name>> Top <<limit>>
template:
- flixpatrol
- shared
- arr
- custom
template_variables:
limit:
default: 10
platform:
default: <<key>>
max: hbo
paramount: paramount_plus
prime: amazon_prime
apple: apple_tv
image:
default: chart/<<key>>_top
translation_key:
default: flixpatrol
dynamic:
default: true

@ -0,0 +1,101 @@
##############################################################################
# FlixPatrol Overlays #
# Created by Yozora, Bullmoose20, anon_fawkes, & Sohjiro #
# EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL #
# https://metamanager.wiki/en/latest/defaults/overlays/flixpatrol.html #
##############################################################################
external_templates:
pmm: templates
template_variables:
default:
pre_text: TOP
style: round
limit: 10
limit_<<key>>: <<limit>>
conditionals:
pmm:
conditions:
- file.exists: false
file_<<key>>.exists: false
url.exists: false
url_<<key>>.exists: false
git.exists: false
git_<<key>>.exists: false
repo.exists: false
repo_<<key>>.exists: false
value: logo/<<style>>/<<key>>
queue: position
back_color: "#00000099"
back_width: 160
back_height: 160
font_size: 50
addon_position: top
addon_offset: 30
back_padding: 15
final_name: text(<<pre_text>><<limit_<<key>>>>)
queues:
position:
default:
horizontal_offset: 30
vertical_offset: 465
vertical_align: top
right:
- horizontal_align: right
- vertical_offset: 670
- vertical_offset: 875
left:
- horizontal_align: left
- vertical_offset: 670
- vertical_offset: 875
templates:
flixpatrol:
default:
slug: <<key>>
location: world
location_<<key>>: <<location>>
limit: 10
limit_<<key>>: <<limit>>
conditionals:
actual_location:
default: <<location_<<key>>>>
conditions:
- key: apple
value: world
ignore_blank_results: true
flixpatrol_top:
platform: <<slug>>
location: <<actual_location>>
limit: <<limit_<<key>>>>
overlays:
Netflix:
variables: {key: netflix, weight: 60}
template: [name: standard, name: flixpatrol]
Disney:
variables: {key: disney, weight: 50}
template: [name: standard, name: flixpatrol]
Max:
variables: {key: max, weight: 40, slug: hbo}
template: [name: standard, name: flixpatrol]
Hulu:
variables: {key: hulu, weight: 30}
template: [name: standard, name: flixpatrol]
Paramount:
variables: {key: paramount, weight: 20, slug: paramount_plus}
template: [name: standard, name: flixpatrol]
Prime:
variables: {key: prime, weight: 10, slug: amazon_prime}
template: [name: standard, name: flixpatrol]
Apple:
variables: {key: apple, weight: 9, slug: apple_tv}
template: [name: standard, name: flixpatrol]

@ -243,6 +243,7 @@ html_theme_options = {
("IMDb Charts", "defaults/chart/imdb"), ("IMDb Charts", "defaults/chart/imdb"),
("TMDb Charts", "defaults/chart/tmdb"), ("TMDb Charts", "defaults/chart/tmdb"),
("Trakt Charts", "defaults/chart/trakt"), ("Trakt Charts", "defaults/chart/trakt"),
("Flixpatrol Charts", "defaults/chart/flixpatrol"),
("AniList Charts", "defaults/chart/anilist"), ("AniList Charts", "defaults/chart/anilist"),
("MyAnimeList Charts", "defaults/chart/myanimelist"), ("MyAnimeList Charts", "defaults/chart/myanimelist"),
("Other Charts", "defaults/chart/other"), ("Other Charts", "defaults/chart/other"),
@ -302,6 +303,7 @@ html_theme_options = {
("Shared Variables", "defaults/overlay_variables"), ("Shared Variables", "defaults/overlay_variables"),
("_divider", ), ("_divider", ),
("_menu", "Chart", "defaults/overlays", "#chart-overlays", [ ("_menu", "Chart", "defaults/overlays", "#chart-overlays", [
("FlixPatrol Top", "defaults/overlays/flixpatrol"),
("Ribbon", "defaults/overlays/ribbon"), ("Ribbon", "defaults/overlays/ribbon"),
]), ]),
("_menu", "Content", "defaults/overlays", "#content-overlays", [ ("_menu", "Content", "defaults/overlays", "#content-overlays", [
@ -463,6 +465,9 @@ html_theme_options = {
("_menu", "ICheckMovies Builders", "metadata/builders/icheckmovies", [ ("_menu", "ICheckMovies Builders", "metadata/builders/icheckmovies", [
("ICheckMovies List", "metadata/builders/icheckmovies", "#icheckmovies-list"), ("ICheckMovies List", "metadata/builders/icheckmovies", "#icheckmovies-list"),
]), ]),
("_menu", "FlixPatrol Builders", "metadata/builders/flixpatrol", [
("FlixPatrol Top Platform", "metadata/builders/flixpatrol", "#flixpatrol-top"),
]),
("_menu", "Reciperr Builders", "metadata/builders/reciperr", [ ("_menu", "Reciperr Builders", "metadata/builders/reciperr", [
("Reciperr List", "metadata/builders/reciperr", "#reciperr-list"), ("Reciperr List", "metadata/builders/reciperr", "#reciperr-list"),
]), ]),

@ -0,0 +1,67 @@
# FlixPatrol Charts Collections
The `flixpatrol` Default Metadata File is used to create collections based on FlixPatrol Charts.
![](../images/flixpatrol.png)
## Requirements & Recommendations
Supported Library Types: Movie, Show
## Collections Section 020
| Collection | Key | Description |
|:----------------------------------|:------------|:---------------------------------------------------------------------------|
| `Netflix Top 10 Movies/Shows` | `netflix` | Collection of the Top Movies/Shows on Netflix according to FlixPatrol. |
| `Disney+ Top 10 Movies/Shows` | `disney` | Collection of the Top Movies/Shows on Disney+ according to FlixPatrol. |
| `MAX Top 10 Movies/Shows` | `max` | Collection of the Top Movies/Shows on MAX according to FlixPatrol. |
| `Hulu Top 10 Movies/Shows` | `hulu` | Collection of the Top Movies/Shows on Hulu according to FlixPatrol. |
| `Paramount+ Top 10 Movies/Shows` | `paramount` | Collection of the Top Movies/Shows on Paramount+ according to FlixPatrol. |
| `Prime Video Top 10 Movies/Shows` | `prime` | Collection of the Top Movies/Shows on Prime Video according to FlixPatrol. |
| `Apple+ Top 10 Movies/Shows` | `apple` | Collection of the Top Movies/Shows on Apple+ according to FlixPatrol. |
## Config
The below YAML in your config.yml will create the collections:
```yaml
libraries:
Movies:
metadata_path:
- pmm: flixpatrol
TV Shows:
metadata_path:
- pmm: flixpatrol
```
## Template Variables
Template Variables can be used to manipulate the file in various ways to slightly change how it works without having to make your own local copy.
Note that the `template_variables:` section only needs to be used if you do want to actually change how the defaults work. Any value not specified is its default value if it has one if not it's just ignored.
All [Shared Collection Variables](../collection_variables) are available as well as the additional Variables below which can be used to customize the file.
| Variable | Description & Values |
|:---------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<br>**Default:** `10`<br>**Values:** Any Number 1-10 |
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Any Number 1-10 |
| `location` | **Description:** Changes the Builder Location for all collections in a Defaults file.<br>**Default:** `world`<br>**Values:** [`location` Attribute Options](../../metadata/builders/flixpatrol.md#top-platform-attributes) |
| `location_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Location of the specified key's collection.<br>**Default:** `location`<br>**Values:** [`location` Attribute Options](../../metadata/builders/flixpatrol.md#top-platform-attributes) |
| `sync_mode` | **Description:** Changes the Sync Mode for all collections in a Defaults file.<br>**Default:** `sync`<br>**Values:**<table class="clearTable"><tr><td>`sync`</td><td>Add and Remove Items based on Builders</td></tr><tr><td>`append`</td><td>Only Add Items based on Builders</td></tr></table> |
| `sync_mode_<<key>>`<sup>1</sup> | **Description:** Changes the Sync Mode of the specified key's collection.<br>**Default:** `sync_mode`<br>**Values:**<table class="clearTable"><tr><td>`sync`</td><td>Add and Remove Items based on Builders</td></tr><tr><td>`append`</td><td>Only Add Items based on Builders</td></tr></table> |
| `collection_order` | **Description:** Changes the Collection Order for all collections in a Defaults file.<br>**Default:** `custom`<br>**Values:**<table class="clearTable"><tr><td>`release`</td><td>Order Collection by Release Dates</td></tr><tr><td>`alpha`</td><td>Order Collection Alphabetically</td></tr><tr><td>`custom`</td><td>Order Collection Via the Builder Order</td></tr><tr><td>[Any `plex_search` Sort Option](../../metadata/builders/plex.md#sort-options)</td><td>Order Collection by any `plex_search` Sort Option</td></tr></table> |
| `collection_order_<<key>>`<sup>1</sup> | **Description:** Changes the Collection Order of the specified key's collection.<br>**Default:** `collection_order`<br>**Values:**<table class="clearTable"><tr><td>`release`</td><td>Order Collection by Release Dates</td></tr><tr><td>`alpha`</td><td>Order Collection Alphabetically</td></tr><tr><td>`custom`</td><td>Order Collection Via the Builder Order</td></tr><tr><td>[Any `plex_search` Sort Option](../../metadata/builders/plex.md#sort-options)</td><td>Order Collection by any `plex_search` Sort Option</td></tr></table> |
1. Each default collection has a `key` that when calling to effect a specific collection you must replace `<<key>>` with when calling.
The below is an example config.yml extract with some Template Variables added in to change how the file works.
```yaml
libraries:
Movies:
metadata_path:
- pmm: flixpatrol
template_variables:
location: united_states
```

@ -31,6 +31,7 @@ These collections are applied by calling the below paths into the `metadata_path
| [IMDb Charts](chart/imdb) | `imdb` | IMDb Popular, IMDb Top 250 | &#9989; | &#9989; | | [IMDb Charts](chart/imdb) | `imdb` | IMDb Popular, IMDb Top 250 | &#9989; | &#9989; |
| [TMDb Charts](chart/tmdb) | `tmdb` | TMDb Popular, TMDb Airing Today | &#9989; | &#9989; | | [TMDb Charts](chart/tmdb) | `tmdb` | TMDb Popular, TMDb Airing Today | &#9989; | &#9989; |
| [Trakt Charts](chart/trakt) | `trakt` | Trakt Popular, Trakt Trending | &#9989;<sup>1</sup> | &#9989;<sup>1</sup> | | [Trakt Charts](chart/trakt) | `trakt` | Trakt Popular, Trakt Trending | &#9989;<sup>1</sup> | &#9989;<sup>1</sup> |
| [FlixPatrol Charts](chart/flixpatrol) | `flixpatrol` | Top Disney, Top Max, Top Hulu, Top Netflix | &#9989; | &#9989; |
| [AniList Charts](chart/anilist) | `anilist` | AniList Popular, AniList Season | &#9989; | &#9989; | | [AniList Charts](chart/anilist) | `anilist` | AniList Popular, AniList Season | &#9989; | &#9989; |
| [MyAnimeList Charts](chart/myanimelist) | `myanimelist` | MyAnimeList Popular, MyAnimeList Top Rated | &#9989; | &#9989; | | [MyAnimeList Charts](chart/myanimelist) | `myanimelist` | MyAnimeList Popular, MyAnimeList Top Rated | &#9989; | &#9989; |
| [Other Charts](chart/other) | `other_chart` | AniDB Popular, Common Sense Selection | &#9989; | &#9989; | | [Other Charts](chart/other) | `other_chart` | AniDB Popular, Common Sense Selection | &#9989; | &#9989; |

@ -60,6 +60,7 @@ This is the default PMM collection ordering:
| `basic` | `010` | | `basic` | `010` |
| `anilist` | `020` | | `anilist` | `020` |
| `imdb` | `020` | | `imdb` | `020` |
| `flixpatrol` | `020` |
| `myanimelist` | `020` | | `myanimelist` | `020` |
| `other_chart` | `020` | | `other_chart` | `020` |
| `tautulli` | `020` | | `tautulli` | `020` |

@ -12,6 +12,7 @@ These overlays are applied by calling the below paths into the `overlay_path` [s
| Default | Path | Example Overlays | Movies | Shows | Seasons | Episodes | | Default | Path | Example Overlays | Movies | Shows | Seasons | Episodes |
|:----------------------------------|:-------------|:-----------------------------------------|:--------:|:-------:|:--------:|:--------:| |:----------------------------------|:-------------|:-----------------------------------------|:--------:|:-------:|:--------:|:--------:|
| [FlixPatrol](overlays/flixpatrol) | `flixpatrol` | "Streaming service logo with words "TOP" | &#9989; | &#9989; | &#10060; | &#10060; |
| [Ribbon](overlays/ribbon) | `ribbon` | IMDb Top 250 Ribbon, RT Fresh Ribbon | &#9989; | &#9989; | &#10060; | &#10060; | | [Ribbon](overlays/ribbon) | `ribbon` | IMDb Top 250 Ribbon, RT Fresh Ribbon | &#9989; | &#9989; | &#10060; | &#10060; |
### Content Overlays ### Content Overlays

@ -0,0 +1,87 @@
# FlixPatrol Top Overlays
The `flixpatrol` Default Overlay File is used to create an overlay based on the Top Lists from FlixPatrol on items within your library.
![](images/flixpatrol.png)
## Requirements & Recommendations
Supported Overlay Level: Movie, Show
## Supported Services
| Service | Key | Weight |
|:------------|:------------|:-------|
| Netflix | `netflix` | `60` |
| Disney+ | `disney` | `50` |
| MAX | `max` | `40` |
| Hulu | `hulu` | `30` |
| Paramount+ | `paramount` | `20` |
| Prime Video | `prime` | `10` |
| Apple+ | `apple` | `9` |
## Config
The below YAML in your config.yml will create the overlays:
```yaml
libraries:
Movies:
overlay_path:
- pmm: flixpatrol
TV Shows:
overlay_path:
- pmm: flixpatrol
```
## Template Variables
Template Variables can be used to manipulate the file in various ways to slightly change how it works without having to make your own local copy.
Note that the `template_variables:` section only needs to be used if you do want to actually change how the defaults work. Any value not specified is its default value if it has one if not it's just ignored.
All [Shared Overlay Variables](../overlay_variables) except `horizontal_offset`, `horizontal_align`, `vertical_offset`, and `vertical_align` are available with the default values below as well as the additional Variables below which can be used to customize the file.
| Variable | Default |
|:--------------------|:------------------|
| `horizontal_offset` | `30` |
| `horizontal_align` | `left`/`right` |
| `vertical_offset` | `465`/`670`/`875` |
| `vertical_align` | `top` |
| `back_color` | `#00000099` |
| `back_radius` | `30` |
| `back_width` | `160` |
| `back_height` | `160` |
| `back_padding` | `15` |
| Variable | Description & Values |
|:----------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `position` | **Description:** Changes the position of the Overlays.<br>**Default:** `right`<br>**Values:** `right`, `left`, or List of Coordinates |
| `style` | **Description:** Changes the style of the Logo Image.<br>**Default:** `round`<br>**Values:** `round` or `square` |
| `pre_text` | **Description:** Changes the text before the number.<br>**Default:** `TOP`<br>**Values:** Any String |
| `limit` | **Description:** Changes the Builder Limit for all overlays in a Defaults file.<br>**Default:** `10`<br>**Values:** Any Number 1-10 |
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's overlay.<br>**Default:** `limit`<br>**Values:** Any Number 1-10 |
| `location` | **Description:** Changes the Builder Location for all overlays in a Defaults file.<br>**Default:** `world`<br>**Values:** [`location` Attribute Options](../../metadata/builders/flixpatrol.md#top-platform-attributes) |
| `location_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Location of the specified key's overlay.<br>**Default:** `location`<br>**Values:** [`location` Attribute Options](../../metadata/builders/flixpatrol.md#top-platform-attributes) |
| `weight_<<key>>`<sup>1</sup> | **Description:** Controls the weight of the Overlay. Higher numbers have priority.<br>**Values:** Any Number |
| `font` | **Description:** Choose the font for the Overlay.<br>**Default:** `fonts/Inter-Medium.ttf`<br>**Values:** Path to font file |
| `font_style` | **Description:** Font style for Variable Fonts.<br>**Values:** Variable Font Style |
| `font_size` | **Description:** Choose the font size for the Overlay.<br>**Default:** `50`<br>**Values:** Any Number greater then 0 |
| `font_color` | **Description:** Choose the font color for the Overlay.<br>**Default:** `#FFFFFF`<br>**Values:** Color Hex Code in format `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA` |
| `stroke_width` | **Description:** Font Stroke Width for the Text Overlay.<br>**Values:** Any Number greater then 0 |
| `stroke_color` | **Description:** Font Stroke Color for the Text Overlay.<br>**Values:** Color Hex Code in format `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA` |
| `addon_offset` | **Description:** Text Addon Image Offset from the text.<br>**Default:** `30`<br>**Values:** Any Number greater then 0 |
| `addon_position` | **Description:** Text Addon Image Alignment in relation to the text.<br>**Default:** `top`<br>**Values:** `left`, `right`, `top`, `bottom` |
1. Each default overlay has a `key` that when calling to effect a specific overlay you must replace `<<key>>` with when calling.
The below is an example config.yml extract with some Template Variables added in to change how the file works.
```yaml
libraries:
Movies:
overlay_path:
- pmm: flixpatrol
template_variables:
location: united_states
```

@ -16,6 +16,7 @@ Builders use third-party services to source items to be added to the collection.
| [MdbList](builders/mdblist) | Grabs items based on metadata and lists on [MdbList.com](https://mdblist.com/). | &#10060; | | [MdbList](builders/mdblist) | Grabs items based on metadata and lists on [MdbList.com](https://mdblist.com/). | &#10060; |
| [Letterboxd](builders/letterboxd) | Grabs items based on metadata and lists on [Letterboxd.com](https://letterboxd.com/). | &#10060; | | [Letterboxd](builders/letterboxd) | Grabs items based on metadata and lists on [Letterboxd.com](https://letterboxd.com/). | &#10060; |
| [ICheckMovies](builders/icheckmovies) | Grabs items based on metadata and lists on [ICheckMovies.com](https://www.icheckmovies.com/). | &#10060; | | [ICheckMovies](builders/icheckmovies) | Grabs items based on metadata and lists on [ICheckMovies.com](https://www.icheckmovies.com/). | &#10060; |
| [FlixPatrol](builders/flixpatrol) | Grabs items based on metadata and lists on [FlixPatrol.com](https://flixpatrol.com/). | &#10060; |
| [Reciperr](builders/reciperr) | Grabs items based on metadata and lists on [reciperr.com](https://reciperr.com/). | &#10060; | | [Reciperr](builders/reciperr) | Grabs items based on metadata and lists on [reciperr.com](https://reciperr.com/). | &#10060; |
| [StevenLu](builders/stevenlu) | Grabs items based on metadata and lists on [StevenLu.com](https://movies.stevenlu.com/). | &#10060; | | [StevenLu](builders/stevenlu) | Grabs items based on metadata and lists on [StevenLu.com](https://movies.stevenlu.com/). | &#10060; |
| [AniDB](builders/anidb) | Grabs items based on metadata and lists on [AniDB.net](https://anidb.net/). | &#10060; | | [AniDB](builders/anidb) | Grabs items based on metadata and lists on [AniDB.net](https://anidb.net/). | &#10060; |

@ -0,0 +1,36 @@
# FlixPatrol Builders
You can find items using the features of [FlixPatrol.com](https://flixpatrol.com/) (FlixPatrol).
No configuration is required for this builder.
| Attribute | Description | Works with Movies | Works with Shows | Works with Playlists and Custom Sort |
|:---------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------|:-----------------:|:----------------:|:------------------------------------:|
| [`flixpatrol_top`](#flixpatrol-top-platform) | Finds every item from [FlixPatrol's Top Platform Lists](https://flixpatrol.com/top10/) based on the attributes provided. | &#9989; | &#9989; | &#9989; |
## FlixPatrol Top Platform
Finds every item from [FlixPatrol's Top Platform Lists](https://flixpatrol.com/top10/) based on the attributes provided.
The only required attribute is `platform`.
The `sync_mode: sync` and `collection_order: custom` Details are recommended since the lists are continuously updated and in a specific order.
### Top Platform Attributes
| Attribute | Description & Values |
|:--------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `platform` | **Description:** Streaming Platform to filter on.<br>**Values:** `amazon_prime`, `apple_tv`, `chili`, `disney`, `freevee`, `globoplay`, `google`, `hbo`, `hulu`, `itunes`, `netflix`, `osn`, `paramount_plus`, `rakuten_tv`, `shahid`, `star_plus`, `starz`, `viaplay`, `vudu` |
| `location` | **Description:** Location to filter on.<br>**Default:** `world`<br>**Values:** `world`, `albania`, `algeria`, `angola`, `argentina`, `armenia`, `australia`, `austria`, `azerbaijan`, `bahamas`, `bahrain`, `bangladesh`, `belarus`, `belgium`, `belize`, `benin`, `bolivia`, `bosnia_and_herzegovina`, `botswana`, `brazil`, `bulgaria`, `burkina_faso`, `cambodia`, `cameroon`, `canada`, `chad`, `chile`, `colombia`, `costa_rica`, `croatia`, `cyprus`, `czech_republic`, `democratic_republic_of_the_congo`, `denmark`, `dominican_republic`, `ecuador`, `egypt`, `estonia`, `finland`, `france`, `gabon`, `georgia`, `germany`, `ghana`, `greece`, `guadeloupe`, `guatemala`, `guyana`, `haiti`, `honduras`, `hong_kong`, `hungary`, `iceland`, `india`, `indonesia`, `iraq`, `ireland`, `israel`, `italy`, `ivory_coast`, `jamaica`, `japan`, `jordan`, `kazakhstan`, `kenya`, `kuwait`, `kyrgyzstan`, `laos`, `latvia`, `lebanon`, `libya`, `lithuania`, `luxembourg`, `madagascar`, `malawi`, `malaysia`, `maldives`, `mali`, `malta`, `martinique`, `mauritania`, `mauritius`, `mexico`, `moldova`, `mongolia`, `montenegro`, `morocco`, `mozambique`, `myanmar`, `namibia`, `netherlands`, `new_caledonia`, `new_zealand`, `nicaragua`, `niger`, `nigeria`, `north_macedonia`, `norway`, `oman`, `pakistan`, `panama`, `papua_new_guinea`, `paraguay`, `peru`, `philippines`, `poland`, `portugal`, `qatar`, `republic_of_the_congo`, `reunion`, `romania`, `russia`, `rwanda`, `salvador`, `saudi_arabia`, `senegal`, `serbia`, `singapore`, `slovakia`, `slovenia`, `somalia`, `south_africa`, `south_korea`, `south_sudan`, `spain`, `sri_lanka`, `sweden`, `switzerland`, `taiwan`, `tajikistan`, `tanzania`, `thailand`, `togo`, `trinidad_and_tobago`, `tunisia`, `turkey`, `turkmenistan`, `uganda`, `ukraine`, `united_arab_emirates`, `united_kingdom`, `united_states`, `uruguay`, `uzbekistan`, `venezuela`, `vietnam`, `yemen`, `zambia`, `zimbabwe` |
| `limit` | **Description:** Number of items to return.<br>**Default:** `10`<br>**Values:** Integer greater than 0 |
```yaml
collections:
US Netflix Monthly Top 20:
flixpatrol_top:
platform: netflix
location: united_states
limit: 20
collection_order: custom
sync_mode: sync
```

@ -1,7 +1,7 @@
import os, re, time import os, re, time
from arrapi import ArrException from arrapi import ArrException
from datetime import datetime from datetime import datetime
from modules import anidb, anilist, icheckmovies, imdb, letterboxd, mal, plex, radarr, reciperr, sonarr, tautulli, tmdb, trakt, tvdb, mdblist, util from modules import anidb, anilist, flixpatrol, icheckmovies, imdb, letterboxd, mal, plex, radarr, reciperr, sonarr, tautulli, tmdb, trakt, tvdb, mdblist, util
from modules.util import Failed, FilterFailed, NonExisting, NotScheduled, NotScheduledRange, Deleted from modules.util import Failed, FilterFailed, NonExisting, NotScheduled, NotScheduledRange, Deleted
from modules.overlay import Overlay from modules.overlay import Overlay
from modules.poster import PMMImage from modules.poster import PMMImage
@ -15,7 +15,7 @@ logger = util.logger
advance_new_agent = ["item_metadata_language", "item_use_original_title"] advance_new_agent = ["item_metadata_language", "item_use_original_title"]
advance_show = ["item_episode_sorting", "item_keep_episodes", "item_delete_episodes", "item_season_display", "item_episode_sorting"] advance_show = ["item_episode_sorting", "item_keep_episodes", "item_delete_episodes", "item_season_display", "item_episode_sorting"]
all_builders = anidb.builders + anilist.builders + icheckmovies.builders + imdb.builders + \ all_builders = anidb.builders + anilist.builders + flixpatrol.builders + icheckmovies.builders + imdb.builders + \
letterboxd.builders + mal.builders + plex.builders + reciperr.builders + tautulli.builders + \ letterboxd.builders + mal.builders + plex.builders + reciperr.builders + tautulli.builders + \
tmdb.builders + trakt.builders + tvdb.builders + mdblist.builders + radarr.builders + sonarr.builders tmdb.builders + trakt.builders + tvdb.builders + mdblist.builders + radarr.builders + sonarr.builders
show_only_builders = [ show_only_builders = [
@ -146,7 +146,7 @@ custom_sort_builders = [
"tvdb_list", "imdb_chart", "imdb_list", "imdb_watchlist", "stevenlu_popular", "anidb_popular", "tmdb_upcoming", "tmdb_airing_today", "tvdb_list", "imdb_chart", "imdb_list", "imdb_watchlist", "stevenlu_popular", "anidb_popular", "tmdb_upcoming", "tmdb_airing_today",
"tmdb_on_the_air", "trakt_list", "trakt_watchlist", "trakt_collection", "trakt_trending", "trakt_popular", "trakt_boxoffice", "tmdb_on_the_air", "trakt_list", "trakt_watchlist", "trakt_collection", "trakt_trending", "trakt_popular", "trakt_boxoffice",
"trakt_collected_daily", "trakt_collected_weekly", "trakt_collected_monthly", "trakt_collected_yearly", "trakt_collected_all", "trakt_collected_daily", "trakt_collected_weekly", "trakt_collected_monthly", "trakt_collected_yearly", "trakt_collected_all",
"trakt_recommendations", "flixpatrol_top", "trakt_recommendations",
"trakt_recommended_personal", "trakt_recommended_daily", "trakt_recommended_weekly", "trakt_recommended_monthly", "trakt_recommended_yearly", "trakt_recommended_all", "trakt_recommended_personal", "trakt_recommended_daily", "trakt_recommended_weekly", "trakt_recommended_monthly", "trakt_recommended_yearly", "trakt_recommended_all",
"trakt_watched_daily", "trakt_watched_weekly", "trakt_watched_monthly", "trakt_watched_yearly", "trakt_watched_all", "trakt_watched_daily", "trakt_watched_weekly", "trakt_watched_monthly", "trakt_watched_yearly", "trakt_watched_all",
"tautulli_popular", "tautulli_watched", "mdblist_list", "letterboxd_list", "icheckmovies_list", "tautulli_popular", "tautulli_watched", "mdblist_list", "letterboxd_list", "icheckmovies_list",
@ -1026,6 +1026,8 @@ class CollectionBuilder:
self._anidb(method_name, method_data) self._anidb(method_name, method_data)
elif method_name in anilist.builders: elif method_name in anilist.builders:
self._anilist(method_name, method_data) self._anilist(method_name, method_data)
elif method_name in flixpatrol.builders:
self._flixpatrol(method_name, method_data)
elif method_name in icheckmovies.builders: elif method_name in icheckmovies.builders:
self._icheckmovies(method_name, method_data) self._icheckmovies(method_name, method_data)
elif method_name in letterboxd.builders: elif method_name in letterboxd.builders:
@ -1444,6 +1446,15 @@ class CollectionBuilder:
new_dictionary["limit"] = util.parse(self.Type, "limit", dict_data, datatype="int", methods=dict_methods, default=0, parent=method_name) new_dictionary["limit"] = util.parse(self.Type, "limit", dict_data, datatype="int", methods=dict_methods, default=0, parent=method_name)
self.builders.append((method_name, new_dictionary)) self.builders.append((method_name, new_dictionary))
def _flixpatrol(self, method_name, method_data):
for dict_data in util.parse(self.Type, method_name, method_data, datatype="listdict"):
dict_methods = {dm.lower(): dm for dm in dict_data}
self.builders.append((method_name, {
"platform": util.parse(self.Type, "platform", dict_data, methods=dict_methods, parent=method_name, options=self.config.FlixPatrol.platforms),
"location": util.parse(self.Type, "location", dict_data, methods=dict_methods, parent=method_name, default="world", options=self.config.FlixPatrol.locations),
"limit": util.parse(self.Type, "limit", dict_data, datatype="int", methods=dict_methods, parent=method_name, default=10, maximum=10)
}))
def _icheckmovies(self, method_name, method_data): def _icheckmovies(self, method_name, method_data):
if method_name.startswith("icheckmovies_list"): if method_name.startswith("icheckmovies_list"):
icheckmovies_lists = self.config.ICheckMovies.validate_icheckmovies_lists(method_data, self.language) icheckmovies_lists = self.config.ICheckMovies.validate_icheckmovies_lists(method_data, self.language)
@ -1870,6 +1881,8 @@ class CollectionBuilder:
ids = self.config.TVDb.get_tvdb_ids(method, value) ids = self.config.TVDb.get_tvdb_ids(method, value)
elif "imdb" in method: elif "imdb" in method:
ids = self.config.IMDb.get_imdb_ids(method, value, self.language) ids = self.config.IMDb.get_imdb_ids(method, value, self.language)
elif "flixpatrol" in method:
ids = self.config.FlixPatrol.get_tmdb_ids(method, value, self.library.is_movie)
elif "icheckmovies" in method: elif "icheckmovies" in method:
ids = self.config.ICheckMovies.get_imdb_ids(method, value, self.language) ids = self.config.ICheckMovies.get_imdb_ids(method, value, self.language)
elif "letterboxd" in method: elif "letterboxd" in method:

@ -7,6 +7,7 @@ from modules.anilist import AniList
from modules.cache import Cache from modules.cache import Cache
from modules.convert import Convert from modules.convert import Convert
from modules.ergast import Ergast from modules.ergast import Ergast
from modules.flixpatrol import FlixPatrol
from modules.icheckmovies import ICheckMovies from modules.icheckmovies import ICheckMovies
from modules.imdb import IMDb from modules.imdb import IMDb
from modules.github import GitHub from modules.github import GitHub
@ -647,6 +648,7 @@ class ConfigFile:
self.IMDb = IMDb(self) self.IMDb = IMDb(self)
self.Convert = Convert(self) self.Convert = Convert(self)
self.AniList = AniList(self) self.AniList = AniList(self)
self.FlixPatrol = FlixPatrol(self)
self.ICheckMovies = ICheckMovies(self) self.ICheckMovies = ICheckMovies(self)
self.Letterboxd = Letterboxd(self) self.Letterboxd = Letterboxd(self)
self.Reciperr = Reciperr(self) self.Reciperr = Reciperr(self)
@ -1119,8 +1121,11 @@ class ConfigFile:
def post(self, url, data=None, json=None, headers=None): def post(self, url, data=None, json=None, headers=None):
return self.session.post(url, data=data, json=json, headers=headers) return self.session.post(url, data=data, json=json, headers=headers)
def load_yaml(self, url):
return YAML(input_data=self.get(url).content).data
@property @property
def mediastingers(self): def mediastingers(self):
if self._mediastingers is None: if self._mediastingers is None:
self._mediastingers = YAML(input_data=self.get(mediastingers_url).content).data self._mediastingers = self.load_yaml(mediastingers_url)
return self._mediastingers return self._mediastingers

@ -0,0 +1,51 @@
from modules import util
from modules.util import Failed
logger = util.logger
ids_url = "https://raw.githubusercontent.com/meisnate12/PMM-TOP10/master/top10.yml"
builders = ["flixpatrol_top"]
class FlixPatrol:
def __init__(self, config):
self.config = config
self._data = None
self._platforms = None
self._locations = None
@property
def data(self):
if self._data is None:
self._data = self.config.load_yaml(ids_url)
return self._data
@property
def platforms(self):
if self._platforms is None:
self._platforms = [platform for platform in self.data]
self._platforms.sort()
return self._platforms
@property
def locations(self):
if self._locations is None:
self._locations = []
for platform in self.data:
self._locations.extend([loc for loc in self.data[platform] if loc not in self._locations and loc != "world"])
self._locations.sort()
self._locations = ["world"] + self._locations
return self._locations
def get_tmdb_ids(self, method, data, is_movie):
if method == "flixpatrol_top":
logger.info("Processing FlixPatrol Top:")
logger.info(f"\tPlatform: {data['platform'].replace('_', ' ').title()}")
logger.info(f"\tLocation: {data['location'].replace('_', ' ').title()}")
logger.info(f"\tLimit: {data['limit']}")
total_items = self.data[data["platform"]][data["location"]]["movies" if is_movie else "shows"][:data["limit"]]
if total_items > 0:
logger.info(f"Processed {total_items} TMDb IDs")
return total_items
else:
raise Failed(f"FlixPatrol Error: No List Items found in {data}")
Loading…
Cancel
Save