You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
419 lines
21 KiB
419 lines
21 KiB
1 year ago
|
# Region Collections
|
||
|
|
||
|
The `region` Default Metadata File is used to dynamically create collections based on the countries within your library. The collection aims to be inclusive, with all 230 countries incorporated into 39 countries or collections of countries. Some care has been taken to ensure all countries are included, and the groupings won't fit well with everyone's collections. Western and Southern Europe, Oceania, and North America could be useful groupings for those libraries with more of an Asian focus, for instance. Please see the comments in the yml below where a decision point might be seen as controversial. You are welcome to edit this to fit your own audience's needs.
|
||
|
|
||
|
**This file has a Movie Library [Counterpart](../movie/region).**
|
||
|
|
||
|
![](../images/region1.png)
|
||
|
|
||
|
## Requirements & Recommendations
|
||
|
|
||
|
Supported Library Types: Show
|
||
|
|
||
|
## Collections Section 081
|
||
|
|
||
|
| Collection | Key | Description |
|
||
|
|:-----------------------------------|:---------------------------------------------------|:----------------------------------------------------------------------------|
|
||
|
| `Region Collections` | `separator` | [Separator Collection](../separators) to denote the Section of Collections. |
|
||
|
| `<<Region>>`<br>**Example:** `de` | `<<2 digit ISO 3166-1 code>>`<br>**Example:** `de` | Collection of TV Shows that have this Region. |
|
||
|
| `Other Regions` | `other` | Collection of TV Shows that are in other uncommon Regions. |
|
||
|
|
||
|
## Config
|
||
|
|
||
|
The below YAML in your config.yml will create the collections:
|
||
|
|
||
|
```yaml
|
||
|
libraries:
|
||
|
TV Shows:
|
||
|
metadata_path:
|
||
|
- pmm: region
|
||
|
```
|
||
|
|
||
|
## Color Style
|
||
|
|
||
|
Below is a screenshot of the alternative Color (`color`) style which can be set via the `style` template variable.
|
||
|
|
||
|
![](../images/region2.png)
|
||
|
|
||
|
## 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.
|
||
|
|
||
|
This file contains a [Separator](../separators) so all [Shared Separator Variables](../separators.md#shared-separator-variables) are available as well.
|
||
|
|
||
|
| Variable | Description & Values |
|
||
|
|:--------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||
|
| `style` | **Description:** Controls the visual theme of the collections created<table class="clearTable"><tr><th>Values:</th></tr><tr><td><code>white</code></td><td>White Theme</td></tr><tr><td><code>color</code></td><td>Color Theme</td></tr></table> |
|
||
|
| `limit` | **Description:** Changes the Builder Limit for all collections in a Defaults file.<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 |
|
||
|
| `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> |
|
||
|
| `sort_by` | **Description:** Changes the Smart Filter Sort for all collections in a Defaults file.<br>**Default:** `release.desc`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) |
|
||
|
| `sort_by_<<key>>`<sup>1</sup> | **Description:** Changes the Smart Filter Sort of the specified key's collection.<br>**Default:** `sort_by`<br>**Values:** [Any `smart_filter` Sort Option](../../metadata/builders/smart.md#sort-options) |
|
||
|
| `include` | **Description:** Overrides the [default include list](#default-include).<br>**Values:** List of [2 digit ISO 3166-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_region_codes) |
|
||
|
| `exclude` | **Description:** Exclude these Countries from creating a Dynamic Collection.<br>**Values:** List of [2 digit ISO 3166-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_region_codes) |
|
||
|
| `addons` | **Description:** Defines how multiple keys can be combined under a parent key. The parent key doesn't have to already exist in Plex<br>**Values:** Dictionary List of [2 digit ISO 3166-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_region_codes) |
|
||
|
| `append_include` | **Description:** Appends to the [default include list](#default-include).<br>**Values:** List of [2 digit ISO 3166-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_region_codes) |
|
||
|
| `key_name_override` | **Description:** Overrides the [default key_name_override dictionary](#default-key_name_override).<br>**Values:** Dictionary with `key: new_key_name` entries |
|
||
|
| `name_format` | **Description:** Changes the title format of the Dynamic Collections.<br>**Default:** `<<key_name>>`<br>**Values:** Any string with `<<key_name>>` in it. |
|
||
|
| `summary_format` | **Description:** Changes the summary format of the Dynamic Collections.<br>**Default:** `<<library_translationU>>s filmed in <<key_name>>.`<br>**Values:** Any string. |
|
||
|
|
||
|
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:
|
||
|
TV Shows:
|
||
|
metadata_path:
|
||
|
- pmm: region
|
||
|
template_variables:
|
||
|
use_other: false
|
||
|
use_separator: false
|
||
|
style: color
|
||
|
sep_style: purple
|
||
|
exclude:
|
||
|
- fr
|
||
|
sort_by: title.asc
|
||
|
```
|
||
|
|
||
|
## Default values
|
||
|
|
||
|
These are lists provided for reference to show what values will be in use if you do no customization. If you want to customize these values, use the methods described above. These do not show how to change a name or a list.
|
||
|
|
||
|
### Default `include`
|
||
|
|
||
|
```yaml
|
||
|
# List of countries other countries will be grouped into
|
||
|
|
||
|
include:
|
||
|
- af # Afghanistan
|
||
|
- aq # Antarctica
|
||
|
- ar # Argentina
|
||
|
- am # Armenia
|
||
|
- au # Australia
|
||
|
- bs # Bahamas
|
||
|
- be # Belgium
|
||
|
- br # Brazil
|
||
|
- ca # Canada
|
||
|
- td # Chad
|
||
|
- cn # China
|
||
|
- cr # Costa Rica
|
||
|
- hr # Croatia
|
||
|
- dk # Denmark
|
||
|
- fr # France
|
||
|
- de # Germany
|
||
|
- gr # Greece
|
||
|
- hk # Hong Kong
|
||
|
- in # India
|
||
|
- ie # Ireland
|
||
|
- it # Italy
|
||
|
- jp # Japan
|
||
|
- ke # Kenya
|
||
|
- kr # Korea
|
||
|
- mx # Mexico
|
||
|
- ma # Morocco
|
||
|
- nz # New Zealand
|
||
|
- ng # Nigeria
|
||
|
- pe # Peru
|
||
|
- pl # Poland
|
||
|
- ru # Russia
|
||
|
- za # South Africa
|
||
|
- es # Spain
|
||
|
- ch # Switzerland
|
||
|
- tw # Taiwan
|
||
|
- th # Thailand
|
||
|
- tr # Turkey
|
||
|
- gb # United Kingdom
|
||
|
- us # United States of America
|
||
|
```
|
||
|
|
||
|
### Default `key_name_override`
|
||
|
|
||
|
```yaml
|
||
|
# Renaming of the above countries
|
||
|
|
||
|
key_name_override:
|
||
|
af: Central Asian
|
||
|
aq: Antarctica Region
|
||
|
ar: Southern Cone
|
||
|
am: Caucasian
|
||
|
au: Australian
|
||
|
bs: Caribbean
|
||
|
be: Benelux
|
||
|
br: Brazilian
|
||
|
ca: Canadian
|
||
|
td: Central African # Based on UN geoscheme
|
||
|
cn: Chinese and Mongolian
|
||
|
cr: Central American
|
||
|
hr: Balkan
|
||
|
dk: Nordic
|
||
|
fr: French
|
||
|
de: German
|
||
|
gr: Greek
|
||
|
hk: Hong Kong and Macao
|
||
|
in: South Asian
|
||
|
ie: Irish
|
||
|
it: Italian
|
||
|
jp: Japanese
|
||
|
ke: Eastern African # Based on UN geoscheme
|
||
|
kr: Korean
|
||
|
mx: Mexican
|
||
|
ma: Northern African # Based on UN geoscheme
|
||
|
nz: Pacific Island
|
||
|
ng: Western African # Based on UN geoscheme
|
||
|
pe: Andean
|
||
|
pl: Eastern European # Eastern Europe generally considerd to be ex-USSR countries of Russia, Belarus, and Ukraine. This grouping is more ex-iron curtain European countries excluding Russia and Balkans
|
||
|
ru: Russian
|
||
|
za: Southern African
|
||
|
es: Iberian
|
||
|
ch: Central European
|
||
|
tw: Taiwanese
|
||
|
th: South-East Asia
|
||
|
tr: Middle Eastern
|
||
|
gb: UK
|
||
|
us: USA
|
||
|
```
|
||
|
### Default `addons`
|
||
|
|
||
|
```yaml
|
||
|
addons:
|
||
|
|
||
|
# Grouping of countries into sub-regions. Some license has been taken here to ensure all countries are included, and the groupings won't fit well with everyone's collections.
|
||
|
# Western, Southern, and Central Europe, Oceania, and North America could be useful groupings for those libraries with more of an Asian focus, for instance
|
||
|
# Comments added where a decision point might seem controversial
|
||
|
|
||
|
af: # Afghanistan # Rarely included as part of Central Asia, the 'stans', but often in South Asia
|
||
|
- kz # Kazakhstan
|
||
|
- kg # Kyrgyzstan
|
||
|
- tj # Tajikistan
|
||
|
- tm # Turkmenistan
|
||
|
- uz # Uzbekistan
|
||
|
ar: # Argentina
|
||
|
- cl # Chile
|
||
|
- py # Paraguay # Not always included as part of Southern Cone
|
||
|
- uy # Uruguay
|
||
|
- fk # Falkland Islands # Also in UK
|
||
|
am: # Armenia
|
||
|
- az # Azerbaijan
|
||
|
- ge # Georgia
|
||
|
bs: # Bahamas
|
||
|
- ai # Anguilla
|
||
|
- ag # Antigua
|
||
|
- aw # Aruba
|
||
|
- bb # Barbados
|
||
|
- bm # Bermuda
|
||
|
- bq # Bonaire
|
||
|
- ky # Cayman Islands
|
||
|
- cu # Cuba
|
||
|
- cw # Curaçao
|
||
|
- dm # Dominica
|
||
|
- do # Dominican Republic
|
||
|
- gd # Grenada
|
||
|
- gp # Guadeloupe
|
||
|
- ht # Haiti
|
||
|
- jm # Jamaica
|
||
|
- mq # Martinique
|
||
|
- ms # Montserrat
|
||
|
- pr # Puerto Rico
|
||
|
- bl # Saint Barthélemy
|
||
|
- lc # Saint Lucia
|
||
|
- tt # Trinidad and Tobago
|
||
|
- tc # Turks and Caicos
|
||
|
be: # Belgium
|
||
|
- lu # Luxembourg
|
||
|
- nl # Netherlands
|
||
|
td: # Chad
|
||
|
- ao # Angola
|
||
|
- cm # Cameroon
|
||
|
- cf # Central African Republic
|
||
|
- cg # Congo
|
||
|
- gq # Equatorial Guinea
|
||
|
- ga # Gabon
|
||
|
- st # Sao Tome and Principe
|
||
|
cn: # China
|
||
|
- mn # Mongolia
|
||
|
cr: # Costa Rica
|
||
|
- bz # Belize
|
||
|
- sv # El Salvador
|
||
|
- gt # Guatemala
|
||
|
- hn # Honduras
|
||
|
- ni # Nicaragua
|
||
|
- pa # Panama
|
||
|
hr: # Croatia
|
||
|
- al # Albania
|
||
|
- ba # Bosnia and Herzegovina
|
||
|
- bg # Bulgaria
|
||
|
- mk # Macedonia
|
||
|
- me # Montenegro
|
||
|
- ro # Romania
|
||
|
- rs # Serbia
|
||
|
- si # Slovenia
|
||
|
dk: # Denmark
|
||
|
- ax # Åland Islands
|
||
|
- fo # Faroe Islands
|
||
|
- fi # Finland
|
||
|
- gl # Greenland
|
||
|
- is # Iceland
|
||
|
- no # Norway
|
||
|
- sj # Svalbard and Jan Mayen
|
||
|
- se # Sweden
|
||
|
hk: # Hong Kong
|
||
|
- mo # Macao
|
||
|
in: # India
|
||
|
- pk # Pakistan
|
||
|
- bt # Bhutan
|
||
|
- bd # Bangladesh
|
||
|
- np # Nepal
|
||
|
- lk # Sri Lanka
|
||
|
- mv # Maldives
|
||
|
ke: # Kenya
|
||
|
- bi # Burundi
|
||
|
- km # Comoros
|
||
|
- dj # Djibouti
|
||
|
- er # Eritrea
|
||
|
- et # Ethiopia
|
||
|
- mg # Madagascar
|
||
|
- mw # Malawi
|
||
|
- mu # Mauritius
|
||
|
- yt # Mayotte
|
||
|
- mz # Mozambique
|
||
|
- re # Réunion
|
||
|
- rw # Rwanda
|
||
|
- sc # Seychelles
|
||
|
- so # Somalia
|
||
|
- ss # South Sudan
|
||
|
- tz # Tanzania
|
||
|
- ug # Uganda
|
||
|
- zm # Zambia
|
||
|
- zw # Zimbabwe
|
||
|
ma: # Morocco
|
||
|
- dz # Algeria
|
||
|
- eg # Egypt # Also in Middle Eastern
|
||
|
- ly # Libya
|
||
|
- sd # Sudan
|
||
|
- tn # Tunisia
|
||
|
nz: # New Zealand
|
||
|
- ck # Cook Islands
|
||
|
- fj # Fiji
|
||
|
- pf # French Polynesia
|
||
|
- gu # Guam
|
||
|
- ki # Kiribati
|
||
|
- mh # Marshall Islands
|
||
|
- fm # Micronesia
|
||
|
- nr # Nauru
|
||
|
- nc # New Caledonia
|
||
|
- nu # Niue
|
||
|
- nf # Norfolk Island
|
||
|
- pw # Palau
|
||
|
- pn # Pitcairn
|
||
|
- ws # Samoa
|
||
|
- sb # Solomon Islands
|
||
|
- tk # Tokelau
|
||
|
- to # Tonga
|
||
|
- tv # Tuvalu
|
||
|
- vu # Vanuatu
|
||
|
ng: # Nigeria
|
||
|
- bj # Benin
|
||
|
- bf # Burkina Faso
|
||
|
- cv # Cabo Verde
|
||
|
- ci # Côte d'Ivoire
|
||
|
- gm # Gambia
|
||
|
- gh # Ghana
|
||
|
- gn # Guinea
|
||
|
- gw # Guinea-Bissau
|
||
|
- lr # Liberia
|
||
|
- ml # Mali
|
||
|
- mr # Mauritania
|
||
|
- ne # Niger
|
||
|
- sn # Senegal
|
||
|
- sl # Sierra Leone
|
||
|
- tg # Togo
|
||
|
pe: # Peru
|
||
|
- bo # Bolivia
|
||
|
- co # Colombia
|
||
|
- ec # Ecuador
|
||
|
- ve # Venezuela
|
||
|
pl: # Poland
|
||
|
- by # Belarus
|
||
|
- cz # Czech Republic
|
||
|
- ee # Estonia
|
||
|
- hu # Hungary
|
||
|
- lv # Latvia
|
||
|
- lt # Lithuania
|
||
|
- md # Moldova
|
||
|
- sk # Slovakia
|
||
|
- ua # Ukraine
|
||
|
za: # South Africa
|
||
|
- bw # Botswana
|
||
|
- sz # Eswatini
|
||
|
- ls # Lesotho
|
||
|
- na # Namibia
|
||
|
es: # Spain
|
||
|
- ad # Andorra # Also in French
|
||
|
- gi # Gibraltar # Also in United Kingdom
|
||
|
- pt # Portugal
|
||
|
ch: # Switzerland
|
||
|
- at # Austria
|
||
|
- li # Liechtenstein
|
||
|
th: # Thailand
|
||
|
- bn # Brunei
|
||
|
- kh # Cambodia
|
||
|
- id # Indonesia
|
||
|
- la # Lao
|
||
|
- my # Malaysia
|
||
|
- mm # Myanmar
|
||
|
- ph # Philippines
|
||
|
- sg # Singapore
|
||
|
- vn # Vietnam
|
||
|
tr: # Turkey
|
||
|
- bh # Bahrain
|
||
|
- cy # Cyprus
|
||
|
- eg # Egypt # Also in Northern African
|
||
|
- ir # Iran
|
||
|
- iq # Iraq
|
||
|
- il # Israel
|
||
|
- jo # Jordan
|
||
|
- kw # Kuwait
|
||
|
- lb # Lebanon
|
||
|
- om # Oman
|
||
|
- ps # Palestine
|
||
|
- qa # Qatar
|
||
|
- sa # Saudi Arabia
|
||
|
- sy # Syria
|
||
|
- ae # United Arab Emirates
|
||
|
- ye # Yemen
|
||
|
|
||
|
# Grouping of micro-states into existing countries. Some are obviously right, others added as they've nowhere else fitting to go.
|
||
|
|
||
|
aq: # Antarctica
|
||
|
- bv # Bouvet Island # Also in Nordic
|
||
|
au: # Australia
|
||
|
- cx # Christmas Island
|
||
|
- cc # Cocos (Keeling) Islands
|
||
|
- pg # New Guinea # Also in Pacific Island
|
||
|
- tl # Timor-Leste # Also in Pacific Island
|
||
|
br: # Brazil
|
||
|
- gf # French Guiana
|
||
|
- gy # Guyana
|
||
|
- sr # Suriname
|
||
|
fr: # France
|
||
|
- mc # Monaco
|
||
|
- ad # Andorra # Also in Iberian
|
||
|
it: # Italy
|
||
|
- va # Holy See
|
||
|
- mt # Malta # Also in UK and Northern Africa
|
||
|
- sm # San Marino
|
||
|
|
||
|
gb: # United Kingdom
|
||
|
- fk # Falkland Islands # Also in Southern Cone
|
||
|
- gg # Guernsey
|
||
|
- gi # Gibraltar # Also in Iberian
|
||
|
- im # Isle of Man
|
||
|
- je # Jersey
|
||
|
- mt # Malta # Also in Italian and Northern African
|
||
|
```
|