Skip to content

Commit

Permalink
Comply to Kodi Addon-Checker
Browse files Browse the repository at this point in the history
  • Loading branch information
f-lawe committed Jan 23, 2025
1 parent 0469548 commit 03b3947
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 53 deletions.
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ root=true

[*]
indent_style = space
indent_size = 4
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.yml]
indent_size = 2
[*.py]
indent_size = 4
54 changes: 27 additions & 27 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.orange.radio" name="Orange Radio" version="1.0.0" provider-name="Flawe">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="script.module.requests" version="2.31.0"/>
<import addon="script.module.routing" version="0.2.3"/>
<import addon="script.module.inputstreamhelper" version="0.6.1"/>
</requires>
<extension point="xbmc.python.pluginsource" library="resources/addon.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en">Summary EN</summary>
<description lang="en">Description EN</description>
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="script.module.requests" version="2.31.0"/>
<import addon="script.module.routing" version="0.2.3"/>
<import addon="script.module.inputstreamhelper" version="0.6.1"/>
</requires>
<extension point="xbmc.python.pluginsource" library="resources/addon.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en">Summary EN</summary>
<description lang="en">Description EN</description>

<summary lang="fr">Summary FR</summary>
<description lang="fr">Description FR</description>
<summary lang="fr">Summary FR</summary>
<description lang="fr">Description FR</description>

<platform>all</platform>
<license>MIT</license>
<forum>https://forum.kodi.tv/showthread.php?tid=360391</forum>
<source>https://github.com/f-lawe/plugin.audio.orange.com</source>
<email>[email protected]</email>
<assets>
<icon>resources/media/orange_radio.png</icon>
<fanart>resources/media/fanart.jpg</fanart>
<screenshot>resources/media/screenshot_1.jpg</screenshot>
<screenshot>resources/media/screenshot_2.jpg</screenshot>
<screenshot>resources/media/screenshot_3.jpg</screenshot>
</assets>
</extension>
<platform>all</platform>
<license>MIT</license>
<forum>https://forum.kodi.tv/showthread.php?tid=360391</forum>
<source>https://github.com/f-lawe/plugin.audio.orange.radio</source>
<email>[email protected]</email>
<assets>
<icon>resources/media/orange_radio.png</icon>
<!-- <fanart>resources/media/fanart.jpg</fanart>
<screenshot>resources/media/screenshot_1.jpg</screenshot>
<screenshot>resources/media/screenshot_2.jpg</screenshot>
<screenshot>resources/media/screenshot_3.jpg</screenshot> -->
</assets>
</extension>
</addon>
14 changes: 7 additions & 7 deletions resources/lib/providers/orange.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ def get_epg(self) -> list:
def get_catchup_items(self, levels: List[str]) -> list:
"""Return a list of directory items for the specified levels."""
depth = len(levels)
item_getters = [
self._get_podcast_radios,
self._get_podcasts,
self._get_podcast_shows,
]

if depth == 0:
return self._get_podcast_radios()
elif depth == 1:
return self._get_podcasts(levels[0])
elif depth == 2:
return self._get_podcast_shows(levels[1])
return item_getters[depth](*levels)

def _get_podcast_radios(self) -> list:
"""Load available podcast radios."""
Expand All @@ -86,7 +86,7 @@ def _get_podcast_radios(self) -> list:
"art": {"thumb": radio["thumb"]},
"path": build_addon_url(f"/podcasts/{radio_id}"),
}
for radio_id, radio in radios.items()
for radio_id, radio in list(radios.items())
]

def _get_podcasts(self, radio_id: str) -> list:
Expand Down
6 changes: 3 additions & 3 deletions resources/lib/utils/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def request_json(url: str, headers: Mapping[str, str] = None, default: Union[dic
def to_cookie_string(cookies: dict, pick: list = None) -> str:
"""Convert cookies to cookie string."""
if pick is None:
pick = cookies.keys()
pick = list(cookies.keys())

cookies = {key: value for key, value in cookies.items() if key in pick}
cookies = {key: value for key, value in list(cookies.items()) if key in pick}

return "; ".join([f"{key}={value}" for key, value in cookies.items()])
return "; ".join([f"{key}={value}" for key, value in list(cookies.items())])


def install_proxy() -> None:
Expand Down
26 changes: 13 additions & 13 deletions resources/settings.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<!-- IPTV Integration -->
<category label="30100">
<setting id="iptv.channels_uri" default="plugin://plugin.audio.orange.radio/iptv/channels"/>
<setting id="iptv.epg_uri" default="plugin://plugin.audio.orange.radio/iptv/epg</default"/>
<setting visible="!System.HasAddon(service.iptv.manager)" label="30101" help="30102" type="action" action="InstallAddon(service.iptv.manager)" option="close"/>
<setting id="iptv.enabled" visible="System.HasAddon(service.iptv.manager)" label="30103" help="30104" type="bool" default="true"/>
<setting visible="System.HasAddon(service.iptv.manager)" label="30105" help="30106" type="action" action="Addon.OpenSettings(service.iptv.manager)" option="close" subsetting="true"/>
</category>
<!-- IPTV Integration -->
<category label="30100">
<setting id="iptv.channels_uri" default="plugin://plugin.audio.orange.radio/iptv/channels"/>
<setting id="iptv.epg_uri" default="plugin://plugin.audio.orange.radio/iptv/epg"/>
<setting visible="!System.HasAddon(service.iptv.manager)" label="30101" help="30102" type="action" action="InstallAddon(service.iptv.manager)" option="close"/>
<setting id="iptv.enabled" visible="System.HasAddon(service.iptv.manager)" label="30103" help="30104" type="bool" default="true"/>
<setting visible="System.HasAddon(service.iptv.manager)" label="30105" help="30106" type="action" action="Addon.OpenSettings(service.iptv.manager)" option="close" subsetting="true"/>
</category>

<!-- Orange -->
<category label="30200">
<setting id="orange.session_data" visible="false" default="{}"/>
<setting type="select" id="orange.country" label="30201" help="30202" values="all|at|be|ca|cn|de|es|fr|ie|jp|gb|nl|pl|pt|sg|us" default="all"/>
</category>
<!-- Orange -->
<category label="30200">
<setting id="orange.session_data" visible="false" default="{}"/>
<setting type="select" id="orange.country" label="30201" help="30202" values="all|at|be|ca|cn|de|es|fr|ie|jp|gb|nl|pl|pt|sg|us" default="all"/>
</category>
</settings>

0 comments on commit 03b3947

Please sign in to comment.