parent
b52c9fea86
commit
c2599a3411
@ -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
|
|
@ -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]
|
|
@ -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 then 0 |
|
|
||||||
| `limit_<<key>>`<sup>1</sup> | **Description:** Changes the Builder Limit of the specified key's collection.<br>**Default:** `limit`<br>**Values:** Number Greater then 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
|
|
||||||
```
|
|
@ -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 then 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 then 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 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
|
|
||||||
```
|
|
@ -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. | ✅ | ✅ | ✅ |
|
|
||||||
| [`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. | ✅ | ✅ | ✅ |
|
|
||||||
| [`flixpatrol_demographics`](#flixpatrol-demographics) | Finds every item from [FlixPatrol's Demographics Lists](https://flixpatrol.com/demographics/) based on the attributes provided. | ✅ | ✅ | ✅ |
|
|
||||||
| [`flixpatrol_url`](#flixpatrol-url) | Finds every item found at a FlixPatrol URL. | ✅ | ✅ | ✅ |
|
|
||||||
|
|
||||||
## 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
|
|
||||||
```
|
|
@ -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}")
|
|
Loading…
Reference in new issue