Skip to content

Commit

Permalink
Add Kodi Addon checker locally and run it
Browse files Browse the repository at this point in the history
  • Loading branch information
f-lawe committed Jun 20, 2024
1 parent 146bb6e commit 15f4826
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,5 @@ jobs:
- name: Run ruff
run: ruff check .

- name: Run kodi-addon-checker
uses: xbmc/[email protected]
with:
is-pr: true
rewrite-for-matrix: false
kodi-version: ${{ matrix.kodi-version }}
addon-id: ${{ github.event.repository.name }}
- name: Run Kodi Addon checker
run: kodi-addon-checker --branch ${{ matrix.kodi-version }} --PR
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
kodi-addon-checker==0.0.*
kodistubs==21.*
ruff==0.3.*
10 changes: 7 additions & 3 deletions resources/lib/utils/orange.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def get_streams(groups: dict, external_id_map: dict, mco: str = "OFR") -> list:
channels = _load_channel_presets(channels, mco)
log(f"{len(channels)} channels found", xbmc.LOGINFO)

channels_without_id = {external_id: channel for external_id, channel in channels.items() if channel["id"] == ""}
channels_without_id = {
external_id: channel for external_id, channel in list(channels.items()) if channel["id"] == ""
}
log(f"{len(channels_without_id)} channels without id", xbmc.LOGINFO)

for external_id in channels_without_id:
Expand All @@ -114,7 +116,7 @@ def get_streams(groups: dict, external_id_map: dict, mco: str = "OFR") -> list:
"stream": "plugin://plugin.video.orange.fr/channels/{channel_id}".format(channel_id=channel["id"]),
"group": [group_name for group_name in groups if int(channel["id"]) in groups[group_name]],
}
for channel in channels.values()
for channel in list(channels.values())
if channel["id"] != "" and "preset" in channel
]

Expand Down Expand Up @@ -270,7 +272,9 @@ def _load_channel_logos(channels: dict, mco: str = "OFR") -> dict:
with urlopen(req) as res:
programs_by_channel = json.loads(res.read())

channel_ids = {programs[0]["externalId"]: programs[0]["channelId"] for programs in programs_by_channel.values()}
channel_ids = {
programs[0]["externalId"]: programs[0]["channelId"] for programs in list(programs_by_channel.values())
}

for external_id in channels:
epg_external_id = _get_external_id(external_id)
Expand Down

0 comments on commit 15f4826

Please sign in to comment.