Skip to content
Open
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
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You have also the possibility to clone the repository, make modifications and cr

```
git clone -b <branch_name> https://github.com/ssapalski/plugin.audio.addict.git
zip -r plugin.audio.addict.zip plugin.audio.addict -x "*git*"
zip -D -r plugin.audio.addict.zip plugin.audio.addict -x "*git*"
```

# Settings
Expand Down
8 changes: 4 additions & 4 deletions addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Unofficial addon for the AudioAddict network of radio streams.
"""

import urlparse
import urllib.parse
import sys
import os

Expand Down Expand Up @@ -49,14 +49,14 @@ def parse_addon_args(query_string):

"""
if query_string.startswith('?'):
args = urlparse.parse_qs(query_string[1:])
args = urllib.parse.parse_qs(query_string[1:])
else:
args = urlparse.parse_qs(query_string)
args = urllib.parse.parse_qs(query_string)

if not args:
return {}

for key, values in args.iteritems():
for key, values in args.items():
if len(values) == 1:
args[key] = values[0]

Expand Down
8 changes: 5 additions & 3 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.addict" name="AudioAddict" version="0.6.1" provider-name="Samuel Sapalski (@leas)">
<addon id="plugin.audio.addict" name="AudioAddict" version="0.6.2" provider-name="Samuel Sapalski (@leas)">
<requires>
<!-- Isengard 15.x -->
<import addon="xbmc.python" version="2.20.0"/>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.requests" version="2.12.4"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
Expand All @@ -16,5 +15,8 @@
<forum>https://forum.kodi.tv/showthread.php?tid=317155</forum>
<license>GNU GENERAL PUBLIC LICENSE. Version 3, 29 June 2007</license>
<source>https://github.com/ssapalski/plugin.audio.addict</source>
<assets>
<icon>resources/icon.png</icon>
</assets>
</extension>
</addon>
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v0.6.2 (2023-May-18)
* fix Kodi 20 incompatibility

v0.6.1 (2018-July-11)
* fix Kodi 18 incompatibility

Expand Down
File renamed without changes
4 changes: 2 additions & 2 deletions resources/lib/audioaddict/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Extension of xbmcaddon.Addon with useful attributes and methods.
"""

import urllib
import urllib.request, urllib.parse, urllib.error
import xbmcaddon


Expand All @@ -19,7 +19,7 @@ def __init__(self, url, handle, args):
self.args = args

def createUrl(self, params):
return self.url + '?' + urllib.urlencode(params)
return self.url + '?' + urllib.parse.urlencode(params)

def getBooleanSetting(self, id_):
setting = super(ExtendedAddon, self).getSetting(id_)
Expand Down
6 changes: 2 additions & 4 deletions resources/lib/audioaddict/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ def get_channels(network):

def create_list_item(channel):
image_url = channel.image_default()
list_item = xbmcgui.ListItem(label=channel.name,
thumbnailImage=image_url,
iconImage=image_url)

list_item = xbmcgui.ListItem(label=channel.name)
list_item.setArt ({"thumb":image_url})
date, time = channel.creation_timestamp.split('T')
timestamp = "%s %s" % (date, time.split('-')[0])

Expand Down
4 changes: 2 additions & 2 deletions resources/lib/audioaddict/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Functionality triggered if the user starts/plays a channel.
"""

import urlparse
import urllib.parse
import requests
import xbmcplugin

Expand Down Expand Up @@ -39,7 +39,7 @@ def play_stream(addon, settings):

def get_valid_channel_url(playlist):
for channel_url in playlist:
parsed_url = urlparse.urlparse(channel_url)
parsed_url = urllib.parse.urlparse(channel_url)
if server_online(parsed_url.netloc):
return channel_url

Expand Down
4 changes: 2 additions & 2 deletions resources/lib/audioaddict/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import os
import json
import xbmc
import xbmcvfs


def get_welcome_text(addon):
Expand Down Expand Up @@ -41,6 +41,6 @@ def get_profile_path(addon):

def get_translated_kodi_path(addon, id_):
kodi_path = addon.getAddonInfo(id_)
real_path = xbmc.translatePath(kodi_path).decode('utf-8')
real_path = xbmcvfs.translatePath(kodi_path)

return real_path
4 changes: 2 additions & 2 deletions resources/lib/audioaddict/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import os
import json
import xbmc
import xbmcvfs

from audioaddict.resources import get_raw_settings

Expand Down Expand Up @@ -66,6 +66,6 @@ def load_settings(settings_path):

def get_settings_path(addon):
kodi_path = addon.getAddonInfo('path')
real_path = xbmc.translatePath(kodi_path).decode('utf-8')
real_path = xbmcvfs.translatePath(kodi_path).decode('utf-8')

return os.path.join(real_path, 'resources', 'data', 'settings.json')