Skip to content

Commit

Permalink
Version 0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Paco8 committed Apr 6, 2023
1 parent 1725dd0 commit 8607a49
Show file tree
Hide file tree
Showing 8 changed files with 232 additions and 26 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,20 @@ If the above tools don't work for you, you can try to get it manually:
- Paste the cookie in a text editor and save the file with the name "cookie.conf".
- Copy the file anywhere in the Android device (for example the Download folder). Then go to the Accounts option in the addon and select "Login with a cookie file" and select the file you previously copied to the device.

## Settings
### Main
- **Streaming service**: Select PeacockTV or SkyShowtime.
- **Preferred server**: Videos are hosted in different servers. You can choose the one which works better for you.
- **Enable 4K**: Enables 4K content. Playback may not work on non 4K devices.
- **Improved subtitles**: Subtitles will be downloaded prior to playback and converted to the more customizable SSA/ASS format.
- **Improved subtitles settings**: Opens a new configuration window that allows you to customize the appearance of subtitles.
- **Use only for these languages**: Only the subtitles for the specified languages (two letter language codes, separated by spaces) will be downloaded. For example: `es en pl` will download subtitles in Spanish, English and Polish.
- **Configure InputStream Adaptive**: Opens the settings of InputStream Adaptive.
### Proxy
- **Manifest alteration**: Allows the addon to perform some changes in the manifest.
- **Fix audio and subtitle language names**: Versions 18 and 19 of Kodi don't support language codes that include a country code (such as `es-ES`). As a workaround, this option removes the country code.
- **Exclude DD+ audio tracks**: The addon will remove any audio tracks in DD+ format.
- **Exclude AAC audio tracks**: The addon will remove any audio tracks in AAC format.

## Donation
If you find this addon useful there's now the possibility to **[buy me a coffee](https://www.buymeacoffee.com/paco8.addons)**.
5 changes: 2 additions & 3 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.skyott"
name="Peacock"
version="0.2.0"
version="0.2.4"
provider-name="Paco8">
<requires>
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
<import addon="script.module.requests"/>
<import addon="script.module.inputstreamhelper" version="0.5.2" />
<!-- <import addon="script.module.pytz"/> -->
<import addon="script.module.dateutil"/>
<!-- <import addon="script.module.ttml2ssa" version="0.1.16" /> -->
<import addon="script.module.ttml2ssa" version="0.1.16" />
</requires>
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides>
Expand Down
58 changes: 55 additions & 3 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# XBMC Media Center language file
# Addon Name: Orange
# Addon id: plugin.video.orange
# Addon version: 0.0.2
# This file is used by 3 addons:
# plugin.video.movistarplus, plugin.video.orange.spain and plugin.video.skyott
# Addon Provider: Paco8
#, fuzzy
msgid ""
Expand All @@ -25,10 +24,12 @@ msgctxt "#30002"
msgid "Proxy"
msgstr ""

# For Orange and Movistar only
msgctxt "#30003"
msgid "Experimental"
msgstr ""

# For Orange and Movistar only
msgctxt "#30010"
msgid "DRM type"
msgstr ""
Expand All @@ -37,14 +38,17 @@ msgctxt "#30011"
msgid "Manifest alteration"
msgstr ""

# For Orange and Movistar only
msgctxt "#30012"
msgid "Use proxy for license"
msgstr ""

# For Orange only
msgctxt "#30013"
msgid "Fix freezes in VOD content"
msgstr ""

# For Orange only
msgctxt "#30016"
msgid "Proxy timeout (ms)"
msgstr ""
Expand All @@ -53,6 +57,7 @@ msgctxt "#30017"
msgid "Show only subscribed content"
msgstr ""

# For Orange only
msgctxt "#30018"
msgid "Try to play HD in SD devices"
msgstr ""
Expand All @@ -61,38 +66,66 @@ msgctxt "#30019"
msgid "Configure InputStream Adaptive"
msgstr ""

# For Orange and Movistar only
msgctxt "#30020"
msgid "Add EPG info to TV channels"
msgstr ""

# For Orange and Movistar only
msgctxt "#30021"
msgid "Download extra info (like posters, actors...)"
msgstr ""

# For Movistar only
msgctxt "#30022"
msgid "Report sessions to servers"
msgstr ""

# For Movistar only
msgctxt "#30023"
msgid "Reuse devices"
msgstr ""

# For Movistar only
msgctxt "#30024"
msgid "Try to fix error 4027"
msgstr ""

# For SkyOTT only
msgctxt "#30031"
msgid "Streaming service"
msgstr ""

# For SkyOTT only
msgctxt "#30032"
msgid "Preferred server"
msgstr ""

# For SkyOTT only
msgctxt "#30033"
msgid "Enable 4K"
msgstr ""

# For SkyOTT only
msgctxt "#30034"
msgid "Fix audio and subtitle language names"
msgstr ""

# For SkyOTT only
msgctxt "#30035"
msgid "Exclude DD+ audio tracks"
msgstr ""

# For SkyOTT only
msgctxt "#30036"
msgid "Exclude AAC audio tracks"
msgstr ""

# For SkyOTT only
msgctxt "#30040"
msgid "Use only for these languages (e.g.: es en pt):"
msgstr ""

msgctxt "#30101"
msgid "Menu"
msgstr ""
Expand All @@ -101,6 +134,7 @@ msgctxt "#30102"
msgid "My list"
msgstr ""

# For Orange and Movistar only
msgctxt "#30103"
msgid "Recordings"
msgstr ""
Expand All @@ -117,6 +151,7 @@ msgctxt "#30106"
msgid "TV shows"
msgstr ""

# For Orange and Movistar only
msgctxt "#30107"
msgid "EPG"
msgstr ""
Expand Down Expand Up @@ -221,22 +256,27 @@ msgctxt "#30167"
msgid "Edit account"
msgstr ""

# For Orange and Movistar only
msgctxt "#30170"
msgid "Play from the beginning"
msgstr ""

# For Orange and Movistar only
msgctxt "#30171"
msgid "Record program"
msgstr ""

# For Orange and Movistar only
msgctxt "#30172"
msgid "Recording scheduled"
msgstr ""

# For Orange and Movistar only
msgctxt "#30173"
msgid "Delete recording"
msgstr ""

# For Orange and Movistar only
msgctxt "#30174"
msgid "Do you want to delete {}?"
msgstr ""
Expand Down Expand Up @@ -293,50 +333,62 @@ msgctxt "#30204"
msgid "Video not available"
msgstr ""

# For Orange and Movistar only
msgctxt "#30300"
msgid "IPTV Manager"
msgstr ""

# For Orange and Movistar only
msgctxt "#30301"
msgid "Install IPTV Manager add-on"
msgstr ""

# For Orange and Movistar only
msgctxt "#30302"
msgid "Enable IPTV Manager integration"
msgstr ""

# For Orange and Movistar only
msgctxt "#30303"
msgid "IPTV Manager settings"
msgstr ""

# For Orange and Movistar only
msgctxt "#30304"
msgid "IPTV"
msgstr ""

# For Orange and Movistar only
msgctxt "#30305"
msgid "Export channels and EPG for IPTV automatically"
msgstr ""

# For Orange and Movistar only
msgctxt "#30306"
msgid "Save to this folder (requires restart)"
msgstr ""

# For Orange and Movistar only
msgctxt "#30307"
msgid "Install IPTV Simple add-on"
msgstr ""

# For Orange and Movistar only
msgctxt "#30308"
msgid "Open IPTV Simple settings"
msgstr ""

# For Orange and Movistar only
msgctxt "#30310"
msgid "Exporting channels"
msgstr ""

# For Orange and Movistar only
msgctxt "#30311"
msgid "Exporting EPG"
msgstr ""

# For Orange and Movistar only
msgctxt "#30312"
msgid "Export channels and EPG now"
msgstr ""
Expand Down
16 changes: 16 additions & 0 deletions resources/language/resource.language.es_es/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@ msgctxt "#30033"
msgid "Enable 4K"
msgstr "Habilitar 4K"

msgctxt "#30034"
msgid "Fix audio and subtitle language names"
msgstr "Arreglar los nombres de idiomas"

msgctxt "#30035"
msgid "Exclude DD+ audio tracks"
msgstr "Excluir audio DD+"

msgctxt "#30036"
msgid "Exclude AAC audio tracks"
msgstr "Excluir audio AAC"

msgctxt "#30040"
msgid "Use only for these languages (e.g.: es en pt):"
msgstr "Usar solo para estos idiomas (ej: es en pt):"

msgctxt "#30101"
msgid "Menu"
msgstr "Menú"
Expand Down
31 changes: 31 additions & 0 deletions resources/lib/parsemanifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env python
# encoding: utf-8
#
# SPDX-License-Identifier: LGPL-2.1-or-later

from __future__ import unicode_literals, absolute_import, division

import re

def extract_tracks(manifest):
pattern = re.compile(r'<AdaptationSet.*?</AdaptationSet>', re.DOTALL)
matches = re.findall(pattern, manifest)
tracks = {'audios': [], 'subs': []}
for track in matches:
t = {'orig': track}
for label in ['contentType', 'Label', 'lang', 'mimeType', 'value', 'codecs']:
m = re.search(r'{}="(.*?)"'.format(label), track, re.DOTALL)
t[label] = m.group(1) if m else ''
m = re.search(r'<BaseURL>(.*?)</BaseURL>', track, re.DOTALL)
t['baseurl'] = m.group(1) if m else ''
if t['contentType'] in ['text', 'audio']:
new_lang = t['lang'][:2]
if t['value'] == 'caption': new_lang += '-[CC]'
if t['value'] == 'forced-subtitle': new_lang += '-[Forced]'
t['new_lang'] = new_lang
t['mod'] = track.replace('lang="{}"'.format(t['lang']), 'lang="{}"'.format(new_lang))
if t['contentType'] == 'text':
tracks['subs'].append(t)
elif t['contentType'] == 'audio':
tracks['audios'].append(t)
return tracks
Loading

0 comments on commit 8607a49

Please sign in to comment.