[2] Merge remote-tracking branch 'chazlarson/no-more-flixpatrol' into nightly

# Conflicts:
#	docs/defaults/chart/flixpatrol.md
#	docs/defaults/overlays/flixpatrol.md
This commit is contained in:
meisnate12 2023-10-03 09:49:19 -04:00
commit 7cb9c75a67
18 changed files with 7 additions and 678 deletions

View file

@ -1 +1 @@
1.19.1-develop1
1.19.1-develop2

View file

@ -1,67 +0,0 @@
##############################################################################
# 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>>
time_window: last_week
time_window_<<key>>: <<time_window>>
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>>
time_window: <<time_window_<<key>>>>
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

View file

@ -1,104 +0,0 @@
##############################################################################
# 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>>
time_window: last_week
time_window_<<key>>: <<time_window>>
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>>
time_window: <<time_window_<<key>>>>
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]

View file

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

View file

@ -1,70 +0,0 @@
# 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:** Number Greater than 0 |
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater than 0 |
| `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) |
| `time_window` | **Description:** Changes the Builder Time Window for all collections in a Defaults file.<br>**Default:** `last_week`<br>**Values:** [`time_window` Attribute Options](../../metadata/builders/flixpatrol.md#top-platform-attributes) |
| `time_window_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Time Window of the specified key's collection.<br>**Default:** `time_window`<br>**Values:** [`time_window` 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
time_window: last_month
```

View file

@ -31,7 +31,6 @@ 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; |
| [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> |
| [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; |
| [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; |

View file

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

View file

@ -63,4 +63,4 @@ Each file has a page on the wiki showing the available `template_variables` for
**In addition to the defined `template_variables` almost all default Metadata and Overlay files have access to their respective [Metadata](collection_variables)/[Overlay](overlay_variables.md) Shared Variables.**
```{include} example.md
```
```

View file

@ -12,7 +12,6 @@ These overlays are applied by calling the below paths into the `overlay_path` [s
| 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; |
### Content Overlays

View file

@ -233,4 +233,4 @@ Each file has a page on the wiki showing the available `template_variables` for
### Examples
```{include} example.md
```
```

View file

@ -1,89 +0,0 @@
# 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 greater than 0 |
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's overlay.<br>**Default:** `limit`<br>**Values:** Any number greater than 0 |
| `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) |
| `time_window` | **Description:** Changes the Builder Time Window for all overlays in a Defaults file.<br>**Default:** `last_week`<br>**Values:** [`time_window` Attribute Options](../../metadata/builders/flixpatrol.md#top-platform-attributes) |
| `time_window_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Time Window of the specified key's overlay.<br>**Default:** `time_window`<br>**Values:** [`time_window` 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 than 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 than 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 than 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
```

View file

@ -78,7 +78,7 @@ docker run -v <PATH_TO_CONFIG>:/config:rw -v <PATH_TO_PLEX>:/plex:rw meisnate12/
```
* The `-v <PATH_TO_CONFIG>:/config:rw` and `-v <PATH_TO_PLEX>:/plex:rw` flags mount the location you choose as a persistent volumes to store your files and give access to plex.
* Change `<PATH_TO_CONFIG>` to a folder where your .env and other files are.
* Change `<PATH_TO_PLEX>` to the "Plex Media Server" folder inside the Plexx appl data folder (this is the folder that contains `Cache`, `Metadata`, `Plug-in Support`).
* Change `<PATH_TO_PLEX>` to the "Plex Media Server" folder inside the Plex app data folder (this is the folder that contains `Cache`, `Metadata`, `Plug-in Support`).
* If your directory has spaces (such as "My Documents"), place quotation marks around your directory pathing as shown here: `-v "<PATH_TO_CONFIG>:/config:rw"`
Example Docker Run command:

View file

@ -16,7 +16,6 @@ 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; |
| [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; |
| [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; |
| [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; |

View file

@ -1,119 +0,0 @@
# 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_popular`](#flixpatrol-popular) | Finds every movie/show from FlixPatrol's Popular [Movies](https://flixpatrol.com/popular/movies/)/[Shows](https://flixpatrol.com/popular/tv-shows/) Lists based on the attributes provided. | &#9989; | &#9989; | &#9989; |
| [`flixpatrol_demographics`](#flixpatrol-demographics) | Finds every item from [FlixPatrol's Demographics Lists](https://flixpatrol.com/demographics/) based on the attributes provided. | &#9989; | &#9989; | &#9989; |
| [`flixpatrol_url`](#flixpatrol-url) | Finds every item found at a FlixPatrol URL. | &#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:** `netflix`, `hbo`, `disney`, `amazon`, `itunes`, `google`, `paramount_plus`, `hulu`, `vudu`, `imdb`, `amazon_prime`, `star_plus, apple_tv` |
| `location` | **Description:** Location to filter on.<br>**Default:** `world`<br>**Values:** `world`, `albania`, `argentina`, `armenia`, `australia`, `austria`, `azerbaijan`, `bahamas`, `bahrain`, `bangladesh`, `belarus`, `belgium`, `belize`, `benin`, `bolivia`, `bosnia_and_herzegovina`, `botswana`, `brazil`, `bulgaria`, `burkina_faso`, `cambodia`, `canada`, `chile`, `colombia`, `costa_rica`, `croatia`, `cyprus`, `czech_republic`, `denmark`, `dominican_republic`, `ecuador`, `egypt`, `estonia`, `finland`, `france`, `gabon`, `germany`, `ghana`, `greece`, `guatemala`, `guinea_bissau`, `haiti`, `honduras`, `hong_kong`, `hungary`, `iceland`, `india`, `indonesia`, `ireland`, `israel`, `italy`, `ivory_coast`, `jamaica`, `japan`, `jordan`, `kazakhstan`, `kenya`, `kuwait`, `kyrgyzstan`, `laos`, `latvia`, `lebanon`, `lithuania`, `luxembourg`, `malaysia`, `maldives`, `mali`, `malta`, `mexico`, `moldova`, `mongolia`, `montenegro`, `morocco`, `mozambique`, `namibia`, `netherlands`, `new_zealand`, `nicaragua`, `niger`, `nigeria`, `north_macedonia`, `norway`, `oman`, `pakistan`, `panama`, `papua_new_guinea`, `paraguay`, `peru`, `philippines`, `poland`, `portugal`, `qatar`, `romania`, `russia`, `rwanda`, `salvador`, `saudi_arabia`, `senegal`, `serbia`, `singapore`, `slovakia`, `slovenia`, `south_africa`, `south_korea`, `spain`, `sri_lanka`, `sweden`, `switzerland`, `taiwan`, `tajikistan`, `tanzania`, `thailand`, `togo`, `trinidad_and_tobago`, `turkey`, `turkmenistan`, `uganda`, `ukraine`, `united_arab_emirates`, `united_kingdom`, `united_states`, `uruguay`, `uzbekistan`, `venezuela`, `vietnam`, `zambia`, `zimbabwe` |
| `time_window` | **Description:** Time window to filter on.<br>**Default:** `today`<br>**Values:** `today`, `yesterday`,`this_week`, `last_week`, `this_month`, `last_month`, `this_year`, `last_year` |
| `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
time_window: this_month
limit: 20
collection_order: custom
sync_mode: sync
```
## FlixPatrol Popular
Finds every movie/show from FlixPatrol's Popular [Movies](https://flixpatrol.com/popular/movies/)/[Shows](https://flixpatrol.com/popular/tv-shows/) Lists based on the attributes provided.
The only required attribute is `source`.
The `sync_mode: sync` and `collection_order: custom` Details are recommended since the lists are continuously updated and in a specific order.
### Popular Attributes
| Attribute | Description |
|:--------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `source` | **Description:** Source to filter on.<br>**Values:** `movie_db`, `facebook`, `google`, `twitter`, `twitter_trends`, `instagram`, `instagram_trends`, `youtube`, `imdb`, `letterboxd`, `rotten_tomatoes`, `tmdb`, `trakt` |
| `time_window` | **Description:** Time window to filter on.<br>**Default:** `today`<br>**Values:** `today`, `yesterday`,`this_week`, `last_week`, `this_month`, `last_month`, `this_year`, `last_year` |
| `limit` | **Description:** Number of items to return.<br>**Default:** `10`<br>**Values:** Integer greater than 0 |
```yaml
collections:
Instagram Popular:
flixpatrol_popular:
source: instagram
time_window: all
limit: 20
collection_order: custom
sync_mode: sync
```
## FlixPatrol Demographics
Finds every item from [FlixPatrol's Demographics Lists](https://flixpatrol.com/demographics/) based on the attributes provided.
The only required attribute is `generation`.
The `sync_mode: sync` and `collection_order: custom` Details are recommended since the lists are continuously updated and in a specific order.
### Demographics Attribute
| Attribute | Description |
|:-------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `generation` | Generation to filter on.<br>**Values:** `all`, `boomers`, `x`, `y`, `z` |
| `gender` | Gender to filter on.<br>**Default:** `all`<br>**Values:** `all`, `men`, `women` |
| `location` | Location to filter on.<br>**Default:** `world`<br>**Values:** `world`, `brazil`, `canada`, `france`, `germany`, `india`, `mexico`, `united_kingdom`, `united_states` |
| `limit` | Number of items to return.<br>**Default:** `10`<br>**Values:** Integer greater than 0 |
```yaml
collections:
Gen X Male US Demographic:
flixpatrol_demographics:
generation: x
gender: men
location: united_states
limit: 20
collection_order: custom
sync_mode: sync
```
## FlixPatrol URL
Finds every item found at a FlixPatrol URL.
The `sync_mode: sync` and `collection_order: custom` Details are recommended since the lists are continuously updated and in a specific order.
```yaml
collections:
US Netflix Monthly:
flixpatrol_url: https://flixpatrol.com/top10/netflix/united-states/2021-11/full/
collection_order: custom
sync_mode: sync
Instagram Monthly Popular:
flixpatrol_url: https://flixpatrol.com/popular/movies/instagram/all-time/
collection_order: custom
sync_mode: sync
Gen X Male US Demographic:
flixpatrol_url: https://flixpatrol.com/demographics/generation-x/men/united-states/
collection_order: custom
sync_mode: sync
```

View file

@ -1,7 +1,7 @@
import os, re, time
from arrapi import ArrException
from datetime import datetime
from modules import anidb, anilist, flixpatrol, icheckmovies, imdb, letterboxd, mal, plex, radarr, reciperr, sonarr, tautulli, tmdb, trakt, tvdb, mdblist, util
from modules import anidb, anilist, 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.overlay import Overlay
from modules.poster import PMMImage
@ -15,7 +15,7 @@ logger = util.logger
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"]
all_builders = anidb.builders + anilist.builders + flixpatrol.builders + icheckmovies.builders + imdb.builders + \
all_builders = anidb.builders + anilist.builders + icheckmovies.builders + imdb.builders + \
letterboxd.builders + mal.builders + plex.builders + reciperr.builders + tautulli.builders + \
tmdb.builders + trakt.builders + tvdb.builders + mdblist.builders + radarr.builders + sonarr.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",
"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",
"flixpatrol_url", "flixpatrol_demographics", "flixpatrol_popular", "flixpatrol_top", "trakt_recommendations",
"trakt_recommendations",
"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",
"tautulli_popular", "tautulli_watched", "mdblist_list", "letterboxd_list", "icheckmovies_list",
@ -1026,8 +1026,6 @@ class CollectionBuilder:
self._anidb(method_name, method_data)
elif method_name in anilist.builders:
self._anilist(method_name, method_data)
elif method_name in flixpatrol.builders:
self._flixpatrol(method_name, method_data)
elif method_name in icheckmovies.builders:
self._icheckmovies(method_name, method_data)
elif method_name in letterboxd.builders:
@ -1445,39 +1443,6 @@ class CollectionBuilder:
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))
def _flixpatrol(self, method_name, method_data):
if method_name.startswith("flixpatrol_url"):
flixpatrol_lists = self.config.FlixPatrol.validate_flixpatrol_lists(method_data, self.language, self.library.is_movie)
for flixpatrol_list in flixpatrol_lists:
self.builders.append(("flixpatrol_url", flixpatrol_list))
elif method_name in flixpatrol.builders:
for dict_data in util.parse(self.Type, method_name, method_data, datatype="listdict"):
dict_methods = {dm.lower(): dm for dm in dict_data}
if method_name == "flixpatrol_demographics":
data = {
"generation": util.parse(self.Type, "generation", dict_data, methods=dict_methods, parent=method_name, options=flixpatrol.generations),
"gender": util.parse(self.Type, "gender", dict_data, methods=dict_methods, parent=method_name, default="all", options=flixpatrol.gender),
"location": util.parse(self.Type, "location", dict_data, methods=dict_methods, parent=method_name, default="world", options=flixpatrol.demo_locations),
"limit": util.parse(self.Type, "limit", dict_data, datatype="int", methods=dict_methods, parent=method_name, default=10)
}
elif method_name == "flixpatrol_popular":
data = {
"source": util.parse(self.Type, "source", dict_data, methods=dict_methods, parent=method_name, options=flixpatrol.popular),
"time_window": util.parse(self.Type, "time_window", dict_data, methods=dict_methods, parent=method_name, default="today"),
"limit": util.parse(self.Type, "limit", dict_data, datatype="int", methods=dict_methods, parent=method_name, default=10)
}
elif method_name == "flixpatrol_top":
data = {
"platform": util.parse(self.Type, "platform", dict_data, methods=dict_methods, parent=method_name, options=flixpatrol.platforms),
"location": util.parse(self.Type, "location", dict_data, methods=dict_methods, parent=method_name, default="world", options=flixpatrol.locations),
"time_window": util.parse(self.Type, "time_window", dict_data, methods=dict_methods, parent=method_name, default="today"),
"limit": util.parse(self.Type, "limit", dict_data, datatype="int", methods=dict_methods, parent=method_name, default=10)
}
else:
continue
if self.config.FlixPatrol.validate_flixpatrol_dict(method_name, data, self.language, self.library.is_movie):
self.builders.append((method_name, data))
def _icheckmovies(self, method_name, method_data):
if method_name.startswith("icheckmovies_list"):
icheckmovies_lists = self.config.ICheckMovies.validate_icheckmovies_lists(method_data, self.language)
@ -1904,8 +1869,6 @@ class CollectionBuilder:
ids = self.config.TVDb.get_tvdb_ids(method, value)
elif "imdb" in method:
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.language, self.library.is_movie)
elif "icheckmovies" in method:
ids = self.config.ICheckMovies.get_imdb_ids(method, value, self.language)
elif "letterboxd" in method:

View file

@ -72,14 +72,6 @@ class Cache:
tmdb_id TEXT,
expiration_date TEXT)"""
)
cursor.execute(
"""CREATE TABLE IF NOT EXISTS flixpatrol_map (
key INTEGER PRIMARY KEY,
flixpatrol_id TEXT UNIQUE,
tmdb_id TEXT,
media_type TEXT,
expiration_date TEXT)"""
)
cursor.execute(
"""CREATE TABLE IF NOT EXISTS omdb_data3 (
key INTEGER PRIMARY KEY,
@ -385,12 +377,6 @@ class Cache:
def update_letterboxd_map(self, expired, letterboxd_id, tmdb_id):
self._update_map("letterboxd_map", "letterboxd_id", letterboxd_id, "tmdb_id", tmdb_id, expired)
def query_flixpatrol_map(self, flixpatrol_id, media_type):
return self._query_map("flixpatrol_map", flixpatrol_id, "flixpatrol_id", "tmdb_id", media_type=media_type)
def update_flixpatrol_map(self, expired, flixpatrol_id, tmdb_id, media_type):
self._update_map("flixpatrol_map", "flixpatrol_id", flixpatrol_id, "tmdb_id", tmdb_id, expired, media_type=media_type)
def _query_map(self, map_name, _id, from_id, to_id, media_type=None, return_type=False):
id_to_return = None
expired = None

View file

@ -7,7 +7,6 @@ from modules.anilist import AniList
from modules.cache import Cache
from modules.convert import Convert
from modules.ergast import Ergast
from modules.flixpatrol import FlixPatrol
from modules.icheckmovies import ICheckMovies
from modules.imdb import IMDb
from modules.github import GitHub
@ -648,7 +647,6 @@ class ConfigFile:
self.IMDb = IMDb(self)
self.Convert = Convert(self)
self.AniList = AniList(self)
self.FlixPatrol = FlixPatrol(self)
self.ICheckMovies = ICheckMovies(self)
self.Letterboxd = Letterboxd(self)
self.Reciperr = Reciperr(self)

View file

@ -1,157 +0,0 @@
from modules import util
from modules.util import Failed
logger = util.logger
builders = ["flixpatrol_url", "flixpatrol_demographics", "flixpatrol_popular", "flixpatrol_top"]
generations = ["all", "boomers", "x", "y", "z"]
generations_translation = {"all": "all-generations", "boomers": "baby-boomers", "x": "generation-x", "y": "generation-y", "z": "generation-z"}
generations_pretty = {"all": "All generations", "boomers": "Baby Boomers", "x": "Generation X", "y": "Generation Y (Millenials)", "z": "Generation Z"}
gender = ["all", "men", "women"]
demo_locations = ["world", "brazil", "canada", "france", "germany", "india", "mexico", "united_kingdom", "united_states"]
locations = [
"world", "albania", "argentina", "armenia", "australia", "austria", "azerbaijan", "bahamas", "bahrain",
"bangladesh", "belarus", "belgium", "belize", "benin", "bolivia", "bosnia_and_herzegovina", "botswana", "brazil",
"bulgaria", "burkina_faso", "cambodia", "canada", "chile", "colombia", "costa_rica", "croatia", "cyprus",
"czech_republic", "denmark", "dominican_republic", "ecuador", "egypt", "estonia", "finland", "france", "gabon",
"germany", "ghana", "greece", "guatemala", "guinea_bissau", "haiti", "honduras", "hong_kong", "hungary", "iceland",
"india", "indonesia", "ireland", "israel", "italy", "ivory_coast", "jamaica", "japan", "jordan", "kazakhstan",
"kenya", "kuwait", "kyrgyzstan", "laos", "latvia", "lebanon", "lithuania", "luxembourg", "malaysia", "maldives",
"mali", "malta", "mexico", "moldova", "mongolia", "montenegro", "morocco", "mozambique", "namibia", "netherlands",
"new_zealand", "nicaragua", "niger", "nigeria", "north_macedonia", "norway", "oman", "pakistan", "panama",
"papua_new_guinea", "paraguay", "peru", "philippines", "poland", "portugal", "qatar", "romania", "russia",
"rwanda", "salvador", "saudi_arabia", "senegal", "serbia", "singapore", "slovakia", "slovenia", "south_africa",
"south_korea", "spain", "sri_lanka", "sweden", "switzerland", "taiwan", "tajikistan", "tanzania", "thailand",
"togo", "trinidad_and_tobago", "turkey", "turkmenistan", "uganda", "ukraine", "united_arab_emirates",
"united_kingdom", "united_states", "uruguay", "uzbekistan", "venezuela", "vietnam", "zambia", "zimbabwe"
]
popular = ["movie_db", "facebook", "google", "twitter", "twitter_trends", "instagram", "instagram_trends", "youtube", "imdb", "letterboxd", "rotten_tomatoes", "tmdb", "trakt"]
platforms = ["netflix", "hbo", "disney", "amazon", "itunes", "google", "paramount_plus", "hulu", "vudu", "imdb", "amazon_prime", "star_plus", "apple_tv"]
base_url = "https://flixpatrol.com"
urls = {
"top10": f"{base_url}/top10/",
"popular_movies": f"{base_url}/popular/movies/",
"popular_shows": f"{base_url}/popular/tv-shows/",
"demographics": f"{base_url}/demographics/"
}
class FlixPatrol:
def __init__(self, config):
self.config = config
def _request(self, url, language, xpath):
logger.trace(f"URL: {url}")
return self.config.get_html(url, headers=util.header(language)).xpath(xpath)
def _tmdb(self, flixpatrol_url, language):
ids = self._request(flixpatrol_url, language, "//script[@type='application/ld+json']/text()")
if len(ids) > 0 and ids[0]:
if "https://www.themoviedb.org" in ids[0]:
return util.regex_first_int(ids[0].split("https://www.themoviedb.org")[1], "TMDb Movie ID")
raise Failed(f"FlixPatrol Error: TMDb Movie ID not found at {flixpatrol_url}")
def _parse_list(self, list_url, language, is_movie, limit=0):
flixpatrol_urls = []
logger.trace(f"URL: {list_url}")
if list_url.startswith(urls["top10"]):
platform = list_url[len(urls["top10"]):].split("/")[0]
flixpatrol_urls = self._request(
list_url, language,
f"//div[@id='{platform}-{'1' if is_movie else '2'}']//a[@class='hover:underline']/@href"
)
logger.info(flixpatrol_urls)
if not flixpatrol_urls:
flixpatrol_urls = self._request(
list_url, language,
f"//h3[text() = '{'TOP 10 Movies' if is_movie else 'TOP 10 TV Shows'}']/following-sibling::div//a[@class='hover:underline']/@href"
)
logger.info(flixpatrol_urls)
elif list_url.startswith(tuple([v for k, v in urls.items()])):
flixpatrol_urls = self._request(
list_url, language,
f"//a[contains(@class, 'flex group') and .//span[.='{'Movie' if is_movie else 'TV Show'}']]/@href"
)
return flixpatrol_urls if limit == 0 else flixpatrol_urls[:limit]
def validate_flixpatrol_lists(self, flixpatrol_lists, language, is_movie):
valid_lists = []
for flixpatrol_list in util.get_list(flixpatrol_lists, split=False):
list_url = flixpatrol_list.strip()
if not list_url.startswith(tuple([v for k, v in urls.items()])):
fails = "\n".join([f"{v} (For {k.replace('_', ' ').title()})" for k, v in urls.items()])
raise Failed(f"FlixPatrol Error: {list_url} must begin with either:\n{fails}")
elif len(self._parse_list(list_url, language, is_movie)) > 0:
valid_lists.append(list_url)
else:
raise Failed(f"FlixPatrol Error: {list_url} failed to parse")
return valid_lists
def validate_flixpatrol_dict(self, method, data, language, is_movie):
return len(self.validate_flixpatrol_lists(self.get_url(method, data, is_movie), language, is_movie)) > 0
def get_url(self, method, data, is_movie):
if method == "flixpatrol_demographics":
return f"{urls['demographics']}" \
f"{generations_translation[data['generation']]}/" \
f"{'all-genders' if data['gender'] == 'all' else data['gender']}/" \
f"{data['location'].replace('_', '-')}/"
elif method == "flixpatrol_popular":
return f"{urls['popular_movies'] if is_movie else urls['popular_shows']}" \
f"{data['source'].replace('_', '-')}/" \
f"{util.time_window(data['time_window'])}/"
elif method == "flixpatrol_top":
return f"{urls['top10']}" \
f"{data['platform'].replace('_', '-')}/" \
f"{data['location'].replace('_', '-')}/" \
f"{util.time_window(data['time_window'])}/full/"
elif method == "flixpatrol_url":
return data
else:
raise Failed(f"FlixPatrol Error: Method {method} not supported")
def get_tmdb_ids(self, method, data, language, is_movie):
if method == "flixpatrol_demographics":
logger.info("Processing FlixPatrol Demographics:")
logger.info(f"\tGeneration: {generations_pretty[data['generation']]}")
logger.info(f"\tGender: {'All genders' if data['gender'] == 'all' else data['gender'].capitalize()}")
logger.info(f"\tLocation: {data['location'].replace('_', ' ').title()}")
logger.info(f"\tLimit: {data['limit']}")
elif method == "flixpatrol_popular":
logger.info("Processing FlixPatrol Popular:")
logger.info(f"\tSource: {data['source'].replace('_', ' ').title()}")
logger.info(f"\tTime Window: {data['time_window'].replace('_', ' ').title()}")
logger.info(f"\tLimit: {data['limit']}")
elif 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"\tTime Window: {data['time_window'].replace('_', ' ').title()}")
logger.info(f"\tLimit: {data['limit']}")
elif method == "flixpatrol_url":
logger.info(f"Processing FlixPatrol URL: {data}")
url = self.get_url(method, data, is_movie)
items = self._parse_list(url, language, is_movie, limit=data["limit"] if isinstance(data, dict) else 0)
media_type = "movie" if is_movie else "show"
total_items = len(items)
if total_items > 0:
ids = []
for i, item in enumerate(items, 1):
logger.ghost(f"Finding TMDb ID {i}/{total_items}")
tmdb_id = None
expired = None
if self.config.Cache:
tmdb_id, expired = self.config.Cache.query_flixpatrol_map(item, media_type)
if not tmdb_id or expired is not False:
try:
tmdb_id = self._tmdb(f"{base_url}{item}", language)
except Failed as e:
logger.error(e)
continue
if self.config.Cache:
self.config.Cache.update_flixpatrol_map(expired, item, tmdb_id, media_type)
ids.append((tmdb_id, "tmdb" if is_movie else "tmdb_show"))
logger.info(f"Processed {total_items} TMDb IDs")
return ids
else:
raise Failed(f"FlixPatrol Error: No List Items found in {data}")