Skip to content

Commit 760d001

Browse files
committedMar 21, 2025·
delete pluto + improve oqee
1 parent f3f9b85 commit 760d001

15 files changed

+198
-429
lines changed
 

‎integrity.sha256

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
adf8f6b6059287c45ab5eb64801e02df1df9f4b7e54065ee1672dd0152b61091
1+
59e5e228c1c8d48ce3bda8a8d70211d37bf1a87c31d90f72f6a17e8c0eba1f1b

‎resources/channel_config/channels_bouygues.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"DorcelXXX.fr": "1572",
7171
"DriveInMovieChannel.fr": "2181",
7272
"Equidia.fr": "64",
73-
"EquinoxeTV.fr": "984",
73+
"EquinoxeTV.af": "984",
7474
"EreTV.fr": "615",
7575
"ES1.fr": "2353",
7676
"Eurochannel.fr": "1190",

‎resources/channel_config/channels_oqee.json

+172-173
Large diffs are not rendered by default.

‎resources/channel_config/channels_orange.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
"CRTV.af": "90594",
246246
"RTNC.af": "90595",
247247
"TeleCongo.af": "90596",
248-
"ORTB.bj": "90597",
248+
"ORTB.af": "90597",
249249
"APlus.af": "90598",
250250
"Africable.af": "90599",
251251
"Canal2International.af": "90601",

‎resources/channel_config/channels_playtv.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"TMC.fr": 134,
1212
"NT1.fr": 148,
1313
"NRJ12.fr": 146,
14-
"LCP.fr": 137,
14+
"LaChaineParlementaire.fr": 137,
1515
"France4.fr": 119,
1616
"BFMTV.fr": 152,
1717
"CNews.fr": 136,

‎resources/channel_config/channels_plutotv.json

-87
This file was deleted.

‎resources/channel_config/channels_sfr.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@
282282
"Arryadia.ar": "956",
283283
"DiscoveryChannel.fr": "400",
284284
"France5.fr": "47",
285-
"MaurienneTV.ar": "3137",
285+
"MaurienneTV.fr": "3137",
286286
"BET.fr": "1960",
287287
"BBlackCaribbean.fr": "2166",
288288
"MurrTV.ar": "945",
@@ -333,7 +333,7 @@
333333
"RMCSportAccess1.fr": "2095",
334334
"MelodyDAfrique.af": "2321",
335335
"TvBreizh.fr": "225",
336-
"CDirect.fr": "3273",
336+
"CDirect.af": "3273",
337337
"Via30Occitanie.fr": "538",
338338
"TVRomaniaInternational.ro": "619",
339339
"FashionTV.fr": "357",

‎resources/channel_config/channels_teleboy.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
"20Mediaset.it": "391",
241241
"TOPcrime.it": "554",
242242
"Cine34.it": "555",
243-
"TGcom24.it": "553",
243+
"Tgcom24.it": "553",
244244
"RealTime.it": "487",
245245
"ClassTVModa.it": "418",
246246
"RTL102.5.it": "282",

‎resources/channel_config/channels_voo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"VooTest.be": "1:10:1008",
7777
"WDR.de": "1:111:11101",
7878
"SWR.de": "1:111:11102",
79-
"SAT1.de": "1:111:11103",
79+
"Sat1.de": "1:111:11103",
8080
"RTLPlus.de": "1:111:11104",
8181
"KIKA.de": "1:111:11105",
8282
"PRO7.de": "1:111:11106",

‎resources/information/default_channels_infos.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -3132,10 +3132,6 @@
31323132
"name": "SAMIRATV",
31333133
"icon": "https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcSgWMkr3IZpIPCy0_1ZAssd6-Q0OYJmKJgKKTQmN5syYxT48-PjS-kw3KE8xQ&s"
31343134
},
3135-
"SAT1.de": {
3136-
"name": "SAT1",
3137-
"icon": "https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcSdmp5mtzhVopBvT4JkNw8j7FrC4IUKELA-YtB5Nz_tOISI-B3dyufjm5pt1Q&s"
3138-
},
31393135
"SC1.ca": {
31403136
"name": "SC1",
31413137
"icon": "https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcRV_NDKMf3Syx4PX3FGywddf8v_3HKkUoqXQztQhixSg-2GaR4UXUvUykpzvg&s"
@@ -6115,7 +6111,7 @@
61156111
"icon": "https:\/\/static-cdn.tv.sfr.net\/data\/logos\/tv_services\/Arryadia_color.png",
61166112
"name": "Arryadia"
61176113
},
6118-
"MaurienneTV.ar": {
6114+
"MaurienneTV.fr": {
61196115
"icon": "https:\/\/static-cdn.tv.sfr.net\/data\/img\/apps\/chaines\/logos\/mauriennetv100x100.png",
61206116
"name": "MAURIENNE TV"
61216117
},

‎src/Component/Provider/Oqee.php

+14-5
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,46 @@ public function __construct(Client $client, ?float $priority = null)
1919

2020
public function constructEPG(string $channel, string $date): Channel|bool
2121
{
22-
$timestamps = array_map(function($hour) use ($date) { return strtotime("$date $hour:00:00 UTC"); }, [0, 6, 12, 18]);
22+
$dateObj = new \DateTimeImmutable($date.' 00:00 +00:00');
23+
$timestamps = array_map(function ($hour) use ($dateObj) { return $dateObj->modify("$hour hours"); }, ['-6', '+0', '+6', '+12', '+18', '+24']);
2324

2425
$channelObj = parent::constructEPG($channel, $date);
2526
if (!$this->channelExists($channel)) {
2627
return false;
2728
}
2829

30+
[$minDate, $maxDate] = $this->getMinMaxDate($date);
2931
foreach ($timestamps as $times) {
3032
$json = json_decode($this->getContentFromURL($this->generateUrl($channelObj, $times)), true);
3133
if (empty($json['result']['entries'])) {
3234
return false;
3335
}
3436

3537
foreach ($json['result']['entries'] as $entrie) {
38+
$startDate = new \DateTimeImmutable('@'.$entrie['live']['start']);
39+
if ($startDate < $minDate) {
40+
continue;
41+
} elseif ($startDate > $maxDate) {
42+
return $channelObj;
43+
}
3644
$program = new Program(date('YmdHis O', $entrie['live']['start']), date('YmdHis O', $entrie['live']['end']));
3745
$program->addTitle($entrie['live']['title']);
3846
$program->addSubtitle($entrie['live']['sub_title']);
3947
$program->addDesc($entrie['live']['description']);
4048
$program->addCategory($entrie['live']['category']);
4149
$program->addCategory($entrie['live']['sub_category']);
42-
$icon = str_replace("h%d", "h1080", $entrie['pictures']['main']);
50+
$icon = str_replace('h%d', 'h1080', $entrie['pictures']['main']);
4351
$program->setIcon($icon);
44-
$program->setRating("-". $entrie['live']['parental_rating']);
52+
$program->setRating('-'. $entrie['live']['parental_rating']);
4553
$channelObj->addProgram($program);
4654
}
4755
}
56+
4857
return $channelObj;
4958
}
5059

51-
public function generateUrl(Channel $channel, $time): string
60+
public function generateUrl(Channel $channel, $date): string
5261
{
53-
return 'https://api.oqee.net/api/v1/epg/by_channel/'. $this->channelsList[$channel->getId()] .'/'.$time;
62+
return 'https://api.oqee.net/api/v1/epg/by_channel/'. $this->channelsList[$channel->getId()] .'/'.$date->getTimestamp();
5463
}
5564
}

‎src/Component/Provider/PlutoTV.php

-94
This file was deleted.

‎tests/Integration/ProvidersTest.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
use racacax\XmlTv\Component\Provider\LEquipeLive;
1313
use racacax\XmlTv\Component\Provider\MyCanal;
1414
use racacax\XmlTv\Component\Provider\NouvelObs;
15+
use racacax\XmlTv\Component\Provider\Oqee;
1516
use racacax\XmlTv\Component\Provider\Orange;
1617
use racacax\XmlTv\Component\Provider\PlayTV;
17-
use racacax\XmlTv\Component\Provider\PlutoTV;
1818
use racacax\XmlTv\Component\Provider\Proximus;
1919
use racacax\XmlTv\Component\Provider\RMC;
2020
use racacax\XmlTv\Component\Provider\SFR;
@@ -63,8 +63,9 @@ class ProvidersTest extends TestCase
6363
[TV5Global::class, ['channels' => ['TV5MondeAsie.fr']]],
6464
[Voo::class, ['channels' => ['TF1.fr']]],
6565
[TVHebdo::class, ['channels' => ['RDS.ca']]],
66+
[Oqee::class, ['channels' => ['TF1.fr']]],
6667
];
67-
private static array $IGNORED_PROVIDERS = [PlutoTV::class, Teleboy::class, LEquipeLive::class];
68+
private static array $IGNORED_PROVIDERS = [Teleboy::class, LEquipeLive::class];
6869

6970
/**
7071
* All Providers must have at least a channel to gather or to have specifically been ignored

‎tests/Ressources/Provider/PlutoTv/south-park.json

-1
This file was deleted.

‎tests/Unit/Component/Provider/PlutoTVTest.php

-54
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.