diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a243754..2c1bd6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,10 +32,5 @@ jobs: - name: Run ruff run: ruff check . - - name: Run kodi-addon-checker - uses: xbmc/action-kodi-addon-checker@v1.2 - 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 diff --git a/requirements.txt b/requirements.txt index 99cfcb6..99fb41e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ +kodi-addon-checker==0.0.* kodistubs==21.* ruff==0.3.* diff --git a/resources/lib/utils/orange.py b/resources/lib/utils/orange.py index 53b33f1..33196a0 100644 --- a/resources/lib/utils/orange.py +++ b/resources/lib/utils/orange.py @@ -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: @@ -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 ] @@ -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)