mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* generate channels xmltv fragment from template * generate movie xmltv fragment from template * generate episode xmltv fragment from template * add channel guide template changelogpull/1597/head
11 changed files with 418 additions and 72 deletions
@ -0,0 +1,30 @@ |
|||||||
|
{{ ## |
||||||
|
|
||||||
|
Available values: |
||||||
|
- channel_number |
||||||
|
- channel_name |
||||||
|
- channel_categories |
||||||
|
- channel_has_artwork |
||||||
|
- channel_artwork_path |
||||||
|
|
||||||
|
{RequestBase} and {AccessTokenUri} are replaced dynamically when XMLTV is requested, |
||||||
|
and must remain as-is in this template to work properly with ETV URLs. |
||||||
|
External URLs do not require these placeholders. |
||||||
|
|
||||||
|
The resulting XML will be minified by ErsatzTV - so feel free to keep things nicely formatted here. |
||||||
|
|
||||||
|
## }} |
||||||
|
|
||||||
|
<channel id="{{ channel_number }}.etv"> |
||||||
|
<display-name>{{ channel_number }} {{ channel_name }}</display-name> |
||||||
|
<display-name>{{ channel_number }}</display-name> |
||||||
|
<display-name>{{ channel_name }}</display-name> |
||||||
|
{{ for category in channel_categories }} |
||||||
|
<category lang="en">{{ category }}</category> |
||||||
|
{{ end }} |
||||||
|
{{ if channel_has_artwork }} |
||||||
|
<icon src="{RequestBase}/iptv/logos/{{ channel_artwork_path }}.jpg{AccessTokenUri}" /> |
||||||
|
{{ else }} |
||||||
|
<icon src="{RequestBase}/iptv/images/ersatztv-500.png{AccessTokenUri}" /> |
||||||
|
{{ end }} |
||||||
|
</channel> |
@ -0,0 +1,63 @@ |
|||||||
|
{{ ## |
||||||
|
|
||||||
|
Available values: |
||||||
|
- programme_start |
||||||
|
- programme_stop |
||||||
|
- channel_number |
||||||
|
- has_custom_title |
||||||
|
- custom_title |
||||||
|
- show_title |
||||||
|
- episode_has_title |
||||||
|
- episode_title |
||||||
|
- episode_has_plot |
||||||
|
- episode_plot |
||||||
|
- show_has_year |
||||||
|
- show_year |
||||||
|
- show_genres |
||||||
|
- episode_has_artwork |
||||||
|
- episode_artwork_url |
||||||
|
- season_number |
||||||
|
- episode_number |
||||||
|
- show_has_content_rating |
||||||
|
- show_content_rating |
||||||
|
- show_guids |
||||||
|
- episode_guids |
||||||
|
|
||||||
|
The resulting XML will be minified by ErsatzTV - so feel free to keep things nicely formatted here. |
||||||
|
|
||||||
|
## }} |
||||||
|
|
||||||
|
<programme start="{{ programme_start }}" stop="{{ programme_stop }}" channel="{{ channel_number }}.etv"> |
||||||
|
{{ if has_custom_title }} |
||||||
|
<title lang="en">{{ custom_title }}</title> |
||||||
|
{{ else }} |
||||||
|
<title lang="en">{{ show_title }}</title> |
||||||
|
{{ if episode_has_title }} |
||||||
|
<sub-title lang="en">{{ episode_title }}</sub-title> |
||||||
|
{{ end }} |
||||||
|
{{ if episode_has_plot }} |
||||||
|
<desc lang="en">{{ episode_plot }}</desc> |
||||||
|
{{ end }} |
||||||
|
<category lang="en">Series</category> |
||||||
|
{{ for genre in show_genres }} |
||||||
|
<category lang="en">{{ genre }}</category> |
||||||
|
{{ end }} |
||||||
|
{{ if episode_has_artwork }} |
||||||
|
<icon src="{{ episode_artwork_url }}" /> |
||||||
|
{{ end }} |
||||||
|
{{ end }} |
||||||
|
<episode-num system="onscreen">S{{ season_number | math.format '00' }}E{{ episode_number | math.format '00' }}</episode-num> |
||||||
|
<episode-num system="xmltv_ns">{{ season_number - 1 }}.{{ episode_number - 1 }}.0/1</episode-num> |
||||||
|
{{ if show_has_content_rating }} |
||||||
|
{{ for rating in show_content_rating | string.split '/' }} |
||||||
|
{{ if rating | string.downcase | string.starts_with 'us:' }} |
||||||
|
<rating system="VCHIP"> |
||||||
|
{{ else }} |
||||||
|
<rating> |
||||||
|
{{ end }} |
||||||
|
<value>{{ rating | string.replace 'us:' '' | string.replace 'US:' '' }}</value> |
||||||
|
</rating> |
||||||
|
{{ end }} |
||||||
|
{{ end }} |
||||||
|
<previously-shown /> |
||||||
|
</programme> |
@ -0,0 +1,56 @@ |
|||||||
|
{{ ## |
||||||
|
|
||||||
|
Available values: |
||||||
|
- programme_start |
||||||
|
- programme_stop |
||||||
|
- channel_number |
||||||
|
- has_custom_title |
||||||
|
- custom_title |
||||||
|
- movie_title |
||||||
|
- movie_has_plot |
||||||
|
- movie_plot |
||||||
|
- movie_has_year |
||||||
|
- movie_year |
||||||
|
- movie_genres |
||||||
|
- movie_has_artwork |
||||||
|
- movie_artwork_url |
||||||
|
- movie_has_content_rating |
||||||
|
- movie_content_rating |
||||||
|
- movie_guids |
||||||
|
|
||||||
|
The resulting XML will be minified by ErsatzTV - so feel free to keep things nicely formatted here. |
||||||
|
|
||||||
|
## }} |
||||||
|
|
||||||
|
<programme start="{{ programme_start }}" stop="{{ programme_stop }}" channel="{{ channel_number }}.etv"> |
||||||
|
{{ if has_custom_title }} |
||||||
|
<title lang="en">{{ custom_title }}</title> |
||||||
|
{{ else }} |
||||||
|
<title lang="en">{{ movie_title }}</title> |
||||||
|
{{ if movie_has_plot }} |
||||||
|
<desc lang="en">{{ movie_plot }}</desc> |
||||||
|
{{ end }} |
||||||
|
{{ if movie_has_year }} |
||||||
|
<date>{{ movie_year }}</date> |
||||||
|
{{ end }} |
||||||
|
<category lang="en">Movie</category> |
||||||
|
{{ for genre in movie_genres }} |
||||||
|
<category lang="en">{{ genre }}</category> |
||||||
|
{{ end }} |
||||||
|
{{ if movie_has_artwork }} |
||||||
|
<icon src="{{ movie_artwork_url }}" /> |
||||||
|
{{ end }} |
||||||
|
{{ end }} |
||||||
|
{{ if movie_has_content_rating }} |
||||||
|
{{ for rating in movie_content_rating | string.split '/' }} |
||||||
|
{{ if rating | string.starts_with 'us:' }} |
||||||
|
<rating system="MPAA"> |
||||||
|
{{ else }} |
||||||
|
<rating> |
||||||
|
{{ end }} |
||||||
|
<value>{{ rating | string.replace 'us:' '' }}</value> |
||||||
|
</rating> |
||||||
|
{{ end }} |
||||||
|
{{ end }} |
||||||
|
<previously-shown /> |
||||||
|
</programme> |
Loading…
Reference in new issue