6.4 KiB
Scripts
The repository contains a few scripts created to automate routine processes and make it a bit easier to maintain.
For the scripts to work, you must have Node.js installed on your computer.
- act:check
- act:format
- act:update
- api:load
- playlist:format
- playlist:update
- playlist:generate
- playlist:validate
- playlist:lint
- playlist:test
- playlist:edit
- playlist:export
- readme:update
- report:create
- lint
- test
act:check
Runs the check workflow locally. Depends on nektos/gh-act.
npm run act:check
act:format
Runs the format workflow locally. Depends on nektos/gh-act.
npm run act:format
act:update
Runs the update workflow locally. Depends on nektos/gh-act.
npm run act:update
api:load
Downloads the latest channel and stream data from the iptv-org/api repository.
npm run api:load
playlist:format
Formats internal playlists. The process includes URL normalization, duplicate removal, removing invalid IDs, and sorting links by channel name, quality, and label.
# format all playlists in the streams/ directory
npm run playlist:format
# format a specific playlist
npm run playlist:format path/to/playlist.m3u
playlist:update
Triggers an update of internal playlists. The process involves processing approved requests from issues.
npm run playlist:update
playlist:generate
Generates all public playlists.
npm run playlist:generate
playlist:validate
Checks IDs and links in internal playlists for errors.
# check all playlists in the streams/ directory
npm run playlist:validate
# check a specific playlist
npm run playlist:validate path/to/playlist.m3u
playlist:lint
Checks internal playlists for syntax errors.
# check all playlists in the streams/ directory
npm run playlist:lint
# check a specific playlist
npm run playlist:lint path/to/playlist.m3u
playlist:test
Tests links in internal playlists.
# check all playlists in the streams/ directory
npm run playlist:test
# check a specific playlist
npm run playlist:test path/to/playlist.m3u
This command will run an automatic check of all links in the playlist and display their status:
npm run playlist:test streams/fr.m3u
streams/fr.m3u
┌─────┬───────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────┬───────────────────────────┐
│ │ tvg-id │ url │ label │ status │
├─────┼───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────┼───────────────────────────┤
│ 0 │ 6ter.fr │ https://origin-caf900c010ea8046.live.6cloud.fr/out/v1/29c7a579af3348b48230f76cd75699a5/dash_short... │ │ LOADING... │
│ 1 │ 20MinutesTV.fr │ https://lives.digiteka.com/stream/86d3e867-a272-496b-8412-f59aa0104771/index.m3u8 │ │ FFMPEG_STREAMS_NOT_FOUND │
│ 2 │ │ https://video1.getstreamhosting.com:1936/8420/8420/playlist.m3u8 │ │ OK │
│ 3 │ ADNTVPlus.fr │ https://samsunguk-adn-samsung-fre-qfrlc.amagi.tv/playlist/samsunguk-adn-samsung-fre/playlist.m3u8 │ Geo-blocked │ HTTP_FORBIDDEN │
│ 4 │ Africa24.fr │ https://edge12.vedge.infomaniak.com/livecast/ik:africa24/manifest.m3u8 │ │ OK │
│ 5 │ Africa24English.fr │ https://edge17.vedge.infomaniak.com/livecast/ik:africa24sport/manifest.m3u8 │ │ OK │
│ 6 │ AfricanewsEnglish.fr │ https://37c774660687468c821a51190046facf.mediatailor.us-east-1.amazonaws.com/v1/master/04fd913bb2... │ │ HTTP_GATEWAY_TIMEOUT │
│ 7 │ AlpedHuezTV.fr │ https://edge.vedge.infomaniak.com/livecast/ik:adhtv/chunklist.m3u8 │ Not 24/7 │ HTTP_NOT_FOUND │
Also, if you add the --fix option to the command, the script will automatically remove all broken streams it finds from your local copy of the playlists:
npm run playlist:test streams/fr.m3u -- --fix
playlist:edit
A utility for quick streams mapping.
npm run playlist:edit path/to/playlist.m3u
playlist:export
Creates a JSON file with all streams for the iptv-org/api repository.
npm run playlist:export
readme:update
Updates the configuration and list of available streams in PLAYLISTS.md.
npm run readme:update
report:create
Creates a report on current issues.
npm run report:create
lint
Checks the utility scripts themselves for syntax errors.
npm run lint
test
Runs a test of all the scripts described above.
npm test