This repository has been archived by the owner on Feb 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathplaylist.php
48 lines (45 loc) · 1.44 KB
/
playlist.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
// DO NO EDIT ANYTHING TO WORK PORPELY
// © @AvishkarPatil | https://github.com/avipatilpro
header("Content-Type: application/vnd.apple.mpegurl");
echo '#EXTM3U' . PHP_EOL;
echo '#EXTM3U x-tvg-url="https://github.com/mitthu786/tvepg/releases/download/latest/epg.xml.gz"' . PHP_EOL;
$json = json_decode(file_get_contents('data/channels.json') , true);
$LANG_MAP = array(
6 => "English",
1 => "Hindi",
2 => "Marathi",
3 => "Punjabi",
4 => "Urdu",
5 => "Bengali",
7 => "Malayalam",
8 => "Tamil",
9 => "Gujarati",
10 => "Odia",
11 => "Telugu",
12 => "Bhojpuri",
13 => "Kannada",
14 => "Assamese",
15 => "Nepali",
16 => "French"
);
$GENRE_MAP = array(
8 => "Sports",
5 => "Entertainment",
6 => "Movies",
12 => "News",
13 => "Music",
7 => "Kids",
9 => "Lifestyle",
10 => "Infotainment",
15 => "Devotional",
16 => "Business",
17 => "Educational",
18 => "Shopping",
19 => "JioDarshan"
);
foreach ($json['result'] as $channel)
{
printf("#EXTINF:-1 tvg-id=\"%u\" group-title=\"%s\" tvg-language=\"%s\" tvg-logo=\"https://jiotv.catchup.cdn.jio.com/dare_images/images/%s\",%s" . PHP_EOL, $channel['channel_id'], $GENRE_MAP[$channel['channelCategoryId']], $LANG_MAP[$channel['channelLanguageId']], $channel['logoUrl'], $channel['channel_name']);
printf("http://%s/JioTV/autoq.php?c=%s" . PHP_EOL . PHP_EOL, $_SERVER['HTTP_HOST'], $channel['target']);
}