Skip to content

Handle multiple urls for a single channel #43

@Roshan-R

Description

@Roshan-R

With the new updates in iptv-org, we have multiple streams for a single channel. currently we are just saving the first stream for a single channel, I suggest we should save all the streams for a single channel and fallback to a different stream if mpv is having issues with playing the first one

Right now the merged data looks like this :

{
  "id": "BBCThree.uk",
  "url": "https://streamer.nexyl.uk/39290a19-b8dd-43ea-b8dc-081c37790f24.m3u8",
  "name": "BBC Three",
  "categories": [
    "general"
  ],
  "is_nsfw": false,
  "languages": null,
  "country": "UK"
}

I suggest we could change it to be

{
  "id": "BBCThree.uk",
  "urls": [
    "https://streamer.nexyl.uk/39290a19-b8dd-43ea-b8dc-081c37790f24.m3u8",
    "https://x.canlitvapp.com/u-bbc3/index.m3u8"
  ],
  "name": "BBC Three",
  "categories": [
    "general"
  ],
  "is_nsfw": false,
  "languages": null,
  "country": "UK"
}

The ordering of the different streams should be deliberate, ordering by quality and if it's geo blocked or not. The new version should then first try and play the first url and if it fails will automatically fallback to the next one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions