Skip to content

Commit

Permalink
Re-add option to disable favorites
Browse files Browse the repository at this point in the history
This PR includes:
- Re-added the settings option to enable/disable favorites
- Only enable My programs when settings enable it and credentials are detected
- Reorganize unit tests (move from vrtplayer to apihelper)
  • Loading branch information
dagwieers committed May 15, 2019
1 parent 1561293 commit 28de194
Show file tree
Hide file tree
Showing 16 changed files with 394 additions and 389 deletions.
13 changes: 5 additions & 8 deletions addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,22 @@ def router(params_string):
_tvguide = tvguide.TVGuide(_kodi)
_tvguide.show_tvguide(params)
return

from resources.lib.vrtplayer import favorites
_favorites = favorites.Favorites(_kodi)
if action == actions.FOLLOW:
from resources.lib.vrtplayer import favorites
_favorites = favorites.Favorites(_kodi)
_favorites.follow(program=params.get('program'), path=params.get('path'))
return
if action == actions.UNFOLLOW:
from resources.lib.vrtplayer import favorites
_favorites = favorites.Favorites(_kodi)
_favorites.unfollow(program=params.get('program'), path=params.get('path'))
return
if action == actions.REFRESH_FAVORITES:
from resources.lib.vrtplayer import favorites
_favorites = favorites.Favorites(_kodi)
_favorites.update_favorites()
return

from resources.lib.vrtplayer import vrtapihelper, vrtplayer
_apihelper = vrtapihelper.VRTApiHelper(_kodi)
_vrtplayer = vrtplayer.VRTPlayer(_kodi, _apihelper)
_apihelper = vrtapihelper.VRTApiHelper(_kodi, _favorites)
_vrtplayer = vrtplayer.VRTPlayer(_kodi, _favorites, _apihelper)

if action == actions.PLAY:
_vrtplayer.play(params)
Expand Down
271 changes: 140 additions & 131 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -15,178 +15,91 @@ msgstr ""
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgctxt "#30000"
msgid "Interface"
msgstr ""

msgctxt "#30001"
msgid "Enable My programs"
msgstr ""

msgctxt "#30002"
msgid "Show episode permalink in plot"
msgstr ""

msgctxt "#30003"
msgid "Enable menu caching"
msgstr ""

### MAIN MENU
msgctxt "#30010"
msgid "Credentials"
msgstr ""

msgctxt "#30011"
msgid "Email address"
msgstr ""

msgctxt "#30012"
msgid "Password"
msgstr ""

msgctxt "#30020"
msgid "Video"
msgstr ""

msgctxt "#30021"
msgid "Subtitles"
msgstr ""

msgctxt "#30022"
msgid "Show subtitles when available"
msgstr ""

msgctxt "#30023"
msgid "Streaming"
msgstr ""

msgctxt "#30024"
msgid "Use DRM for 720p HD-quality livestreams"
msgstr ""

msgctxt "#30025"
msgid "Maximum bandwidth (kbps)"
msgstr ""

msgctxt "#30040"
msgid "Debug"
msgstr ""

msgctxt "#30041"
msgid "InputStream Adaptive settings..."
msgstr ""

msgctxt "#30042"
msgid "Install Widevine (for DRM content)"
msgstr ""

msgctxt "#30047"
msgid "Refresh favorites"
msgstr ""

msgctxt "#30048"
msgid "Clear VRT cookies"
msgstr ""

msgctxt "#30049"
msgid "Log level"
msgstr ""

msgctxt "#30051"
msgid "Login failed!"
msgstr ""

msgctxt "#30052"
msgid "Invalid email adress or password. Only VRT logins are supported, no Google or Facebook logins."
msgstr ""

msgctxt "#30053"
msgid "This program cannot be played. To view this program outside of Belgium, you first have to validate a Belgian mobile phone number on the VRT NU website."
msgstr ""

msgctxt "#30054"
msgid "Whoops something went wrong, check the kodi log for more details."
msgstr ""

msgctxt "#30055"
msgid "Please fill in your email address to login."
msgstr ""

msgctxt "#30056"
msgid "Please fill in your password to login."
msgstr ""

msgctxt "#30057"
msgid "Please increase the maximum bandwidth. Maximum bandwidth is set to %s kbps, but this stream needs a minimum of %s kbps."
msgstr ""

msgctxt "#30061"
msgid "Using a SOCKS proxy requires the PySocks library (script.module.pysocks) installed."
msgstr ""

msgctxt "#30078"
msgid "My programs"
msgstr ""

msgctxt "#30079"
msgctxt "#30011"
msgid "Browse only the programs you follow"
msgstr ""

msgctxt "#30080"
msgctxt "#30012"
msgid "A-Z"
msgstr ""

msgctxt "#30081"
msgctxt "#30013"
msgid "Alphabetically sorted list of TV programs"
msgstr ""

msgctxt "#30082"
msgctxt "#30014"
msgid "Categories"
msgstr ""

msgctxt "#30083"
msgctxt "#30015"
msgid "TV programs listed by category"
msgstr ""

msgctxt "#30084"
msgctxt "#30016"
msgid "Channels"
msgstr ""

msgctxt "#30085"
msgctxt "#30017"
msgid "TV programs listed by channel"
msgstr ""

msgctxt "#30086"
msgctxt "#30018"
msgid "Live TV"
msgstr ""

msgctxt "#30087"
msgctxt "#30019"
msgid "Watch TV channels live (using Internet streaming)"
msgstr ""

msgctxt "#30088"
msgctxt "#30020"
msgid "Most recent"
msgstr ""

msgctxt "#30089"
msgctxt "#30021"
msgid "Recently published episodes of TV programs"
msgstr ""

msgctxt "#30090"
msgctxt "#30022"
msgid "TV guide"
msgstr ""

msgctxt "#30091"
msgctxt "#30023"
msgid "Browse channel TV guides"
msgstr ""

msgctxt "#30092"
msgctxt "#30024"
msgid "Search VRT NU"
msgstr ""

msgctxt "#30093"
msgctxt "#30025"
msgid "Search the complete VRT NU library"
msgstr ""


### FAVORITES
msgctxt "#30040"
msgid "My A-Z"
msgstr ""

msgctxt "#30041"
msgid "Alphabetically sorted list of My TV programs"
msgstr ""

msgctxt "#30042"
msgid "My recent items"
msgstr ""

msgctxt "#30043"
msgid "Recently published episodes of My TV programs"
msgstr ""


### APPLICATION
msgctxt "#30094"
msgid "Season"
msgstr ""
Expand Down Expand Up @@ -283,18 +196,114 @@ msgctxt "#30416"
msgid "We could not find any programs that were followed.\n\nEither right-click on a program or an episode to follow a program, or follow a program on the VRT NU website."
msgstr ""

msgctxt "#30420"
msgid "My A-Z"

### SETTINGS
msgctxt "#30800"
msgid "Interface"
msgstr ""

msgctxt "#30421"
msgid "Alphabetically sorted list of My TV programs"
msgctxt "#30801"
msgid "Enable My programs"
msgstr ""

msgctxt "#30422"
msgid "My recent items"
msgctxt "#30803"
msgid "Show episode permalink in plot"
msgstr ""

msgctxt "#30423"
msgid "Recently published episodes of My TV programs"
msgctxt "#30805"
msgid "Enable menu caching"
msgstr ""

msgctxt "#30820"
msgid "Credentials"
msgstr ""

msgctxt "#30821"
msgid "Email address"
msgstr ""

msgctxt "#30823"
msgid "Password"
msgstr ""

msgctxt "#30840"
msgid "Video"
msgstr ""

msgctxt "#30841"
msgid "Subtitles"
msgstr ""

msgctxt "#30843"
msgid "Show subtitles when available"
msgstr ""

msgctxt "#30845"
msgid "Streaming"
msgstr ""

msgctxt "#30847"
msgid "Use DRM for 720p HD-quality livestreams"
msgstr ""

msgctxt "#30849"
msgid "Maximum bandwidth (kbps)"
msgstr ""

msgctxt "#30860"
msgid "Debug"
msgstr ""

msgctxt "#30861"
msgid "InputStream Adaptive settings..."
msgstr ""

msgctxt "#30863"
msgid "Install Widevine (for DRM content)"
msgstr ""

msgctxt "#30865"
msgid "Refresh favorites"
msgstr ""

msgctxt "#30867"
msgid "Clear VRT cookies"
msgstr ""

msgctxt "#30869"
msgid "Log level"
msgstr ""


### MESSAGES
msgctxt "#30951"
msgid "Login failed!"
msgstr ""

msgctxt "#30952"
msgid "Invalid email adress or password. Only VRT logins are supported, no Google or Facebook logins."
msgstr ""

msgctxt "#30953"
msgid "This program cannot be played. To view this program outside of Belgium, you first have to validate a Belgian mobile phone number on the VRT NU website."
msgstr ""

msgctxt "#30954"
msgid "Whoops something went wrong, check the kodi log for more details."
msgstr ""

msgctxt "#30955"
msgid "Please fill in your email address to login."
msgstr ""

msgctxt "#30956"
msgid "Please fill in your password to login."
msgstr ""

msgctxt "#30957"
msgid "Please increase the maximum bandwidth. Maximum bandwidth is set to %s kbps, but this stream needs a minimum of %s kbps."
msgstr ""

msgctxt "#30961"
msgid "Using a SOCKS proxy requires the PySocks library (script.module.pysocks) installed."
msgstr ""

0 comments on commit 28de194

Please sign in to comment.