Skip to content

Conversation

@StrangeDrVN
Copy link
Contributor

@StrangeDrVN StrangeDrVN commented Jan 14, 2026

Plex.tv

  • removed plex.tv.channels.xml.
  • added new *.channels.xml based on api response in browser.
  • *_all.channels.xml contains channels common to all. The first half of the site_id is possibly region key while the second half is the channel id(gridkey).
  • to-do: change language in de/nl/other channels. My knowledge is limited here.
  • could get channels from other regions, but someone with proper VPN could do it.
  • currently few channels may be repeated in other regions.
  • fixes: Add Fox Sports channel on Plex #2802

Pluto.tv

  • updated uk and us channels.xml

new

  • updated plex config's site_id logic; logos/url for channels
  • old parser failed to get program image, season, episode.
  • old title was subTitle(episode title).
test
 
npm test --- plex.tv

> test
> cross-env TZ=Pacific/Nauru npx jest --runInBand plex.tv

 PASS  sites/plex.tv/plex.tv.test.js
   can generate valid url (5 ms)
   can generate valid request headers (3 ms)
   can parse response (3 ms)
   can handle empty guide (1 ms)
   can parse channel list (2 ms)

Test Suites: 1 passed, 1 total
Tests:       5 passed, 5 total
Snapshots:   0 total
Time:        0.734 s, estimated 1 s
Ran all test suites matching plex.tv.
grab
 npm run grab --- --channels=sites/plex.tv/plex.tv_us.channels.xml --output=plex_guide.xml --days=1

> grab
> tsx scripts/commands/epg/grab.ts --channels=sites/plex.tv/plex.tv_us.channels.xml --output=plex_guide.xml --days=1

info starting...
info loading channels...
info found 546 channel(s)
info loading api data...
info creating queue...
info run:
info   [1/546] plex.tv (en) - AsianCrush.us@SD - Jan 15, 2026 (28 programs)
info   [2/546] plex.tv (en) - WuTangCollection.us@SD - Jan 15, 2026 (13 programs)
info   [3/546] plex.tv (en) - FailArmy.us@US - Jan 15, 2026 (47 programs)
info   [4/546] plex.tv (en) - RetroCrush.us@SD - Jan 15, 2026 (42 programs)
info   [5/546] plex.tv (en) - 5f6b8e5900b0950040d0f2af - Jan 15, 2026 (42 programs)
info   [6/546] plex.tv (en) - Journy.us@SD - Jan 15, 2026 (37 programs)
info   [7/546] plex.tv (en) - BabySharkTV.us@SD - Jan 15, 2026 (48 programs)
info   [8/546] plex.tv (en) - 64e6e2f04a5e9b4cedc6d52b - Jan 15, 2026 (16 programs)
info   [9/546] plex.tv (en) - 64e6df6e4a5e9b4cedc6d529 - Jan 15, 2026 (23 programs)
...

based on latest data
uk contained ?fr/es channels earlier
deleted original xml since many are returning 0 programs
_all contains common channels
@StrangeDrVN
Copy link
Contributor Author

StrangeDrVN commented Jan 15, 2026

Plex.tv

  • This line might not be needed, since the source xml has gridkey which can be used as site_id.
    5e20b730f2f8d5003d739db7-5ef51c802ddee5003f1c0225 (needed only for the m3u8) becomes 5ef51c802ddee5003f1c0225

    const [, channelGridKey] = channel.site_id.split('-')

  • And we change id to gridKey

    site_id: c.id,

  • example from source

<Channel art="https://provider-static.plex.tv/epg/cms/production/793fe1ec-0f93-4033-a560-32e0650a36e1/bloomberg_hor.jpg" coverPoster="https://provider-static.plex.tv/epg/cms/production/a853e5b4-59af-45e9-99ca-239a91dc0ec1/bloomberg_vert.jpg" genreRatingKeys="genre_6006cc1d610ee2002c74f37a" gridKey="68fafc6e558214386ab7ca3a" hidden="0" id="5e20b730f2f8d5003d739db7-68fafc6e558214386ab7ca3a" isHd="0" language="en" slug="bloomberg-tv" summary="Bloomberg Television offers global business and markets news, data, analysis, and stories from Bloomberg News and Business week." thumb="https://provider-static.plex.tv/epg/cms/production/6cdd3f62-4cd0-47a2-b57c-f15ff4318463/bloomtv_white_rdx.png" title="Bloomberg TV" vcn="000">
<Media drm="0" container="mpegts" protocol="hls" optimizedForStreaming="1" videoCodec="h264">
<Part container="mpegts" id="5e20b730f2f8d5003d739db7-68fafc6e558214386ab7ca3a" key="/library/parts/5e20b730f2f8d5003d739db7-68fafc6e558214386ab7ca3a.m3u8" rafAdapter="none"/>
</Media>
</Channel>
  • example epg from source
<Video guid="plex://episode/69551a6b6cb3041ed90919dc" key="/library/metadata/69551a6b6cb3041ed90919dc" ratingKey="69551a6b6cb3041ed90919dc" summary="Fran loses one million dollars after investing it without consulting Maxwell first." type="episode" contentRating="TV-PG" duration="1610000" grandparentArt="https://images.frequency.com/video/7320169465914387484/solid/rectangle/w1920_h1080/3pv7gnigef5q1n8uz95yhpr0a.png" grandparentGuid="plex://show/692110ca185c8d5272590cc4" grandparentKey="/library/metadata/692110ca185c8d5272590cc4" grandparentRatingKey="692110ca185c8d5272590cc4" grandparentThumb="https://images.frequency.com/video/originals/7320169465914387484/Texted/rectangle/wonnlgco2crx1v4w2ydb4cmc6.jpg" grandparentTitle="The Nanny" grandparentType="show" index="12" originallyAvailableAt="2025-04-21T00:00:00Z" parentIndex="6" skipParent="1" thumb="https://images.frequency.com/video/7320169759605702690/solid/rectangle/w1920_h1080/1fpwioxaoc9y01f9x3k6djwgk5.png" title="The Fran In The Mirror" userState="0" year="2025">
<Image alt="The Fran In The Mirror" type="coverArt" url="https://images.frequency.com/video/7320169465914387484/solid/rectangle/w1920_h1080/3pv7gnigef5q1n8uz95yhpr0a.png"/>
<Image alt="The Fran In The Mirror" type="coverPoster" url="https://images.frequency.com/video/originals/7320169465914387484/Texted/rectangle/wonnlgco2crx1v4w2ydb4cmc6.jpg"/>
<Image alt="The Fran In The Mirror" type="snapshot" url="https://images.frequency.com/video/7320169759605702690/solid/rectangle/w1920_h1080/1fpwioxaoc9y01f9x3k6djwgk5.png"/>
<Genre filter="genre=6006cc18610ee2002c74f2f9" id="6006cc18610ee2002c74f2f9" key="/library/sections/home/all?genre=6006cc18610ee2002c74f2f9" ratingKey="genre_6006cc18610ee2002c74f2f9" slug="comedy" tag="Comedy" type="directory" context="tag.genre"/>
<Media beginsAt="1768448965" duration="1610000" endsAt="1768450575" id="69566c0ea7765751b766f99c" onAir="0" premiere="0" videoResolution="720" origin="livetv"/>
</Video>

changed site_id logic
fixed site_id in *.channels.xml
added test for channels list
added logo and url to channels function
@StrangeDrVN
Copy link
Contributor Author

what exactly is the purpose of url in channels parser? the output xml ignores the url.

fix parser context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add Fox Sports channel on Plex

1 participant