Skip to content

Commit

Permalink
Add menu for configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelarnauts committed Jan 29, 2021
1 parent 25f6fa0 commit 5b0fd29
Show file tree
Hide file tree
Showing 28 changed files with 1,591 additions and 177 deletions.
3 changes: 3 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ disable=
raise-missing-from, # This does not work on Python 2.7, remove later
super-with-arguments,
too-few-public-methods,
too-many-arguments,
too-many-branches,
too-many-instance-attributes,
too-many-locals,
max-line-length=160
max-statements=70
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ check-translations:
)
@tests/check_for_unused_translations.py

update-translations:
@echo -e "$(white)=$(blue) Updating languages$(reset)"
@-$(foreach lang,$(languages), \
tests/update_translations.py resources/language/resource.language.$(lang)/strings.po resources/language/resource.language.en_gb/strings.po; \
)

check-addon: clean build
@echo ">>> Running addon checks"
$(eval TMPDIR := $(shell mktemp -d))
Expand Down
11 changes: 5 additions & 6 deletions addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
<requires>
<import addon="xbmc.python" version="2.26.0"/>
<import addon="script.module.dateutil" version="2.6.0"/>
<import addon="script.module.routing" version="0.2.0"/>
<import addon="pvr.iptvsimple" version="3.8.8"/>
</requires>
<!-- This is needed to get an add-on icon -->
<extension point="xbmc.python.script" library="default.py">
<extension point="xbmc.python.pluginsource" library="addon_entry.py">
<provides>executable</provides>
</extension>
<extension point="xbmc.service" library="service.py"/>
<extension point="xbmc.python.library" library="default.py"/>
<extension point="xbmc.service" library="service_entry.py"/>
<extension point="kodi.context.item">
<menu id="kodi.core.main">
<item library="context.py">
<item library="context_entry.py">
<label>30600</label>
<visible>String.StartsWith(System.BuildVersion,18) + Window.IsVisible(tvguide) | Window.IsVisible(tvsearch)</visible>
</item>
Expand All @@ -27,7 +26,7 @@
<description lang="en_GB">This add-on integrates IPTV Channels from other Add-ons in the Kodi PVR.</description>
<description lang="ru_RU">Это дополнение интегрирует IPTV каналы из других дополнений в Kodi PVR.</description>
<description lang="hu_HU">Ez a kiegészítő lehetővé teszi más kiegészítők számára, hogy saját IPTV csatornákat publikáljanak a Kodi PVR felületébe.</description>
<description lang="el_GR">Το πρόσθετο αυτο ενσωματώνει τα κανάλια IPTV από άλλα πρόσθετα στο PVR του Kodi</description>
<description lang="el_GR">Το πρόσθετο αυτο ενσωματώνει τα κανάλια IPTV από άλλα πρόσθετα στο PVR του Kodi.</description>
<platform>all</platform>
<license>GPL-3.0-only</license>
<news>v0.2.2 (2020-12-07)
Expand Down
18 changes: 18 additions & 0 deletions addon_entry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
"""Addon entry point"""

from __future__ import absolute_import, division, unicode_literals

from xbmcaddon import Addon

from resources.lib import kodiutils, kodilogging

# Reinitialise ADDON every invocation to fix an issue that settings are not fresh.
kodiutils.ADDON = Addon()
kodilogging.ADDON = Addon()

if __name__ == '__main__':
from sys import argv
from resources.lib.addon import run

run(argv)
5 changes: 3 additions & 2 deletions context.py → context_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from __future__ import absolute_import, division, unicode_literals

from resources.lib.functions import run
if __name__ == '__main__':
from resources.lib.addon import run

run([-1, 'play_from_contextmenu'])
run(['/play'])
11 changes: 0 additions & 11 deletions default.py

This file was deleted.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ pytest-cov
pytest-timeout
python-dateutil
mock
git+git://github.com/dagwieers/kodi-plugin-routing.git@setup#egg=routing
#sakee
git+git://github.com/retrospect-addon/kodi.emulator.ascii.git@master#egg=sakee
114 changes: 108 additions & 6 deletions resources/language/resource.language.el_gr/strings.po
Original file line number Diff line number Diff line change
@@ -1,17 +1,100 @@
# Kodi Media Center language file
# Addon Name: IPTV Manager
# Addon id: service.iptv.manager
msgid ""
msgstr ""
"Language: en\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

### CONTEXT MENU
# MENU
msgctxt "#30001"
msgid "Refresh channels and guide now…"
msgstr ""

msgctxt "#30002"
msgid "IPTV Manager Settings…"
msgstr ""

msgctxt "#30003"
msgid "Manage Sources…"
msgstr ""

msgctxt "#30004"
msgid "Sources"
msgstr ""

msgctxt "#30010"
msgid "Supported Add-ons"
msgstr ""

msgctxt "#30011"
msgid "Custom Sources"
msgstr ""

msgctxt "#30012"
msgid "Add Source…"
msgstr ""

msgctxt "#30013"
msgid "Delete Source"
msgstr ""

msgctxt "#30020"
msgid "Name"
msgstr ""

msgctxt "#30021"
msgid "Modify the name of this source."
msgstr ""

msgctxt "#30022"
msgid "Enabled"
msgstr ""

msgctxt "#30023"
msgid "Enable or disable this source."
msgstr ""

msgctxt "#30024"
msgid "Yes"
msgstr ""

msgctxt "#30025"
msgid "No"
msgstr ""

msgctxt "#30026"
msgid "Playlist"
msgstr ""

msgctxt "#30027"
msgid "Select the channel data in M3U format for this source."
msgstr ""

msgctxt "#30028"
msgid "EPG"
msgstr ""

msgctxt "#30029"
msgid "Select the EPG data in XMLTV format for this source."
msgstr ""

msgctxt "#30030"
msgid "Enter URL…"
msgstr ""

msgctxt "#30031"
msgid "Browse for file…"
msgstr ""

# CONTEXT MENU
msgctxt "#30600"
msgid "Play with IPTV Manager"
msgstr "Αναπαραγωγή με τον διαχειριστή IPTV"


### MESSAGES
# MESSAGES
msgctxt "#30700"
msgid "Are you sure you want to setup IPTV Simple for the use with IPTV Manager? Any existing configuration of IPTV Simple will be overwritten."
msgstr "Είστε σίγουροι ότι θέλετε να ρυθμίσετε το IPTV Simple για χρήση με τον διαχειριστή IPTV; Όλες οι υπάρχουσες ρυθμίσεις του IPTV simple θα επαναγραφτούν."
Expand Down Expand Up @@ -40,8 +123,7 @@ msgctxt "#30706"
msgid "This program isn't available to play."
msgstr "Το πρόγραμμα αυτό είναι μη διαθέσιμο για αναπαραγωγή."


### SETTINGS
# SETTINGS
msgctxt "#30800"
msgid "Channels"
msgstr "Κανάλια"
Expand Down Expand Up @@ -77,3 +159,23 @@ msgstr "Άνοιγμα των ρυθμίσεων του IPTV Simple"
msgctxt "#30824"
msgid "Automatically restart IPTV Simple to refresh the data"
msgstr "Αυτόματη ανανέωση του IPTV Simple για ανανέωση των δεδομένων"

msgctxt "#30880"
msgid "Expert"
msgstr ""

msgctxt "#30881"
msgid "Logging"
msgstr ""

msgctxt "#30882"
msgid "Enable debug logging"
msgstr ""

msgctxt "#30883"
msgid "Install Kodi Logfile Uploader…"
msgstr ""

msgctxt "#30884"
msgid "Open Kodi Logfile Uploader…"
msgstr ""
111 changes: 108 additions & 3 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
@@ -1,17 +1,102 @@
# Kodi Media Center language file
# Addon Name: IPTV Manager
# Addon id: service.iptv.manager
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

### CONTEXT MENU
# MENU
msgctxt "#30001"
msgid "Refresh channels and guide now…"
msgstr ""

msgctxt "#30002"
msgid "IPTV Manager Settings…"
msgstr ""

msgctxt "#30003"
msgid "Manage Sources…"
msgstr ""

msgctxt "#30004"
msgid "Sources"
msgstr ""

msgctxt "#30010"
msgid "Supported Add-ons"
msgstr ""

msgctxt "#30011"
msgid "Custom Sources"
msgstr ""

msgctxt "#30012"
msgid "Add Source…"
msgstr ""

msgctxt "#30013"
msgid "Delete Source"
msgstr ""

msgctxt "#30020"
msgid "Name"
msgstr ""

msgctxt "#30021"
msgid "Modify the name of this source."
msgstr ""

msgctxt "#30022"
msgid "Enabled"
msgstr ""

msgctxt "#30023"
msgid "Enable or disable this source."
msgstr ""

msgctxt "#30024"
msgid "Yes"
msgstr ""

msgctxt "#30025"
msgid "No"
msgstr ""

msgctxt "#30026"
msgid "Playlist"
msgstr ""

msgctxt "#30027"
msgid "Select the channel data in M3U format for this source."
msgstr ""

msgctxt "#30028"
msgid "EPG"
msgstr ""

msgctxt "#30029"
msgid "Select the EPG data in XMLTV format for this source."
msgstr ""

msgctxt "#30030"
msgid "Enter URL…"
msgstr ""

msgctxt "#30031"
msgid "Browse for file…"
msgstr ""


# CONTEXT MENU
msgctxt "#30600"
msgid "Play with IPTV Manager"
msgstr ""


### MESSAGES
# MESSAGES
msgctxt "#30700"
msgid "Are you sure you want to setup IPTV Simple for the use with IPTV Manager? Any existing configuration of IPTV Simple will be overwritten."
msgstr ""
Expand Down Expand Up @@ -41,7 +126,7 @@ msgid "This program isn't available to play."
msgstr ""


### SETTINGS
# SETTINGS
msgctxt "#30800"
msgid "Channels"
msgstr ""
Expand Down Expand Up @@ -77,3 +162,23 @@ msgstr ""
msgctxt "#30824"
msgid "Automatically restart IPTV Simple to refresh the data"
msgstr ""

msgctxt "#30880"
msgid "Expert"
msgstr ""

msgctxt "#30881"
msgid "Logging"
msgstr ""

msgctxt "#30882"
msgid "Enable debug logging"
msgstr ""

msgctxt "#30883"
msgid "Install Kodi Logfile Uploader…"
msgstr ""

msgctxt "#30884"
msgid "Open Kodi Logfile Uploader…"
msgstr ""
Loading

0 comments on commit 5b0fd29

Please sign in to comment.