Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin.audio.nrjradio] 1.0.1 #540

Merged
merged 1 commit into from Jun 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions plugin.audio.nrjradio/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,12 @@

from resources.lib import nrjradio

params = dict(urlparse.parse_qsl(sys.argv[2].replace('?','')))

params = dict(urlparse.parse_qsl(sys.argv[2].replace('?','')))

try:
action = params['action']
except:
action = None
try:
url = params['url']
except:
url = None
action = params.get('action')

url = params.get('url')


if action == None:
Expand Down
2 changes: 1 addition & 1 deletion plugin.audio.nrjradio/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.nrjradio" version="1.0.0" name="NRJ Radio" provider-name="lambda">
<addon id="plugin.audio.nrjradio" version="1.0.1" name="NRJ Radio" provider-name="lambda">
<requires>
<import addon="xbmc.python" version="2.24.0" />
<import addon="script.module.lamlib" version="1.0.0" />
Expand Down
3 changes: 3 additions & 0 deletions plugin.audio.nrjradio/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[B]1.0.1[/B]
- Code cosmetics

[B]1.0.0[/B]
- Initial version
10 changes: 5 additions & 5 deletions plugin.audio.nrjradio/resources/language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ msgid ""
msgstr ""


msgctxt "#30001"
msgctxt "#32001"
msgid "Radios"
msgstr ""

msgctxt "#30002"
msgctxt "#32002"
msgid "Bookmarks"
msgstr ""

msgctxt "#30500"
msgctxt "#32500"
msgid "Next..."
msgstr ""

msgctxt "#30501"
msgctxt "#32501"
msgid "Add to bookmarks"
msgstr ""

msgctxt "#30502"
msgctxt "#32502"
msgid "Remove from bookmarks"
msgstr ""
10 changes: 5 additions & 5 deletions plugin.audio.nrjradio/resources/language/Greek/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ msgid ""
msgstr ""


msgctxt "#30001"
msgctxt "#32001"
msgid "Radios"
msgstr "Σταθμοί"

msgctxt "#30002"
msgctxt "#32002"
msgid "Bookmarks"
msgstr "Σελιδοδείκτες"

msgctxt "#30500"
msgctxt "#32500"
msgid "Next..."
msgstr "Επόμενα..."

msgctxt "#30501"
msgctxt "#32501"
msgid "Add to bookmarks"
msgstr "Προσθήκη στους σελιδοδείκτες"

msgctxt "#30502"
msgctxt "#32502"
msgid "Remove from bookmarks"
msgstr "Αφαίρεση από σελιδοδείκτες"
8 changes: 4 additions & 4 deletions plugin.audio.nrjradio/resources/lib/nrjradio.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ def __init__(self):
def root(self):
self.list = [
{
'title': 30001,
'title': 32001,
'action': 'radios'
},

{
'title': 30002,
'title': 32002,
'action': 'bookmarks'
}
]
Expand All @@ -57,7 +57,7 @@ def bookmarks(self):
for i in self.list:
bookmark = dict((k,v) for k, v in i.iteritems() if not k == 'next')
bookmark['delbookmark'] = i['url']
i.update({'cm': [{'title': 30502, 'query': {'action': 'deleteBookmark', 'url': json.dumps(bookmark)}}]})
i.update({'cm': [{'title': 32502, 'query': {'action': 'deleteBookmark', 'url': json.dumps(bookmark)}}]})

self.list = sorted(self.list, key=lambda k: k['title'].lower())

Expand All @@ -75,7 +75,7 @@ def radios(self):
for i in self.list:
bookmark = dict((k,v) for k, v in i.iteritems() if not k == 'next')
bookmark['bookmark'] = i['url']
i.update({'cm': [{'title': 30501, 'query': {'action': 'addBookmark', 'url': json.dumps(bookmark)}}]})
i.update({'cm': [{'title': 32501, 'query': {'action': 'addBookmark', 'url': json.dumps(bookmark)}}]})

directory.add(self.list, infotype='Music')
return self.list
Expand Down