Skip to content

Commit c16fffb

Browse files
committed
new protocol M3US (similiar to M3U, but instead of a cfg file an explicit URL is used instead)
1 parent 5405f2f commit c16fffb

19 files changed

+66
-14
lines changed

README

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Configuration:
108108
| | | | | Y=2 tries to find the video URL internally
109109
| | | | | H=F uses ffmpeg
110110
| | | | | H=V uses vlc
111+
| | | | | M3US:
111112
| | | | | STREAM: H=F uses ffmpeg
112113
| | | | | H=V uses vlc
113114
| | | | | RADIO: H=F uses ffmpeg
@@ -119,6 +120,7 @@ Configuration:
119120
| | | | FILE: file location
120121
| | | | EXT: script location
121122
| | | | M3U: m3u playlist
123+
| | | | M3US: m3u URL
122124
| | | | RADIO: An URL for a radio stream
123125
| | | | STREAM: An URL for a video stream
124126
| | | Stream protocol ("UDP", "CURL", "HTTP", "FILE", "EXT", "M3U", "RADIO", "STREAM")

checkurl.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ void CheckURL::executeChecks() {
8989
u = cIptvProtocolM3U::findUrl(itp.Parameter(), itp.Address());
9090
break;
9191

92+
case cIptvTransponderParameters::eProtocolM3US:
93+
u = itp.Address();
94+
break;
95+
9296
case cIptvTransponderParameters::eProtocolRadio:
9397
case cIptvTransponderParameters::eProtocolStream:
9498
u = itp.Address();
@@ -102,7 +106,6 @@ void CheckURL::executeChecks() {
102106
if (!u.empty()) {
103107
u = ReplaceAll(u, "%3A", ":");
104108
u = ReplaceAll(u, "%7C", "|");
105-
106109
}
107110
channels[*Channel->GetChannelID().ToString()] = u;
108111
}

device.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ bool cIptvDevice::SetChannelDevice(const cChannel *channelP, bool liveViewP) {
316316
break;
317317

318318
case cIptvTransponderParameters::eProtocolM3U:
319+
case cIptvTransponderParameters::eProtocolM3US:
319320
protocol = pM3UProtocolM;
320321
break;
321322

@@ -336,7 +337,7 @@ bool cIptvDevice::SetChannelDevice(const cChannel *channelP, bool liveViewP) {
336337
pidScanEnabledM = itp.PidScan()!=0;
337338

338339
if (pIptvStreamerM &&
339-
pIptvStreamerM->SetSource(protocol, { itp.Address(), itp.Parameter(), deviceIndexM, channelP->Number(), itp.UseYtdlp(), itp.HandlerType() })) {
340+
pIptvStreamerM->SetSource(protocol, { itp.Protocol(), itp.Address(), itp.Parameter(), deviceIndexM, channelP->Number(), itp.UseYtdlp(), itp.HandlerType() })) {
340341
channelM = *channelP;
341342

342343
if (sidScanEnabledM && pSidScannerM && IptvConfig.GetSectionFiltering()) {

m3u8handler.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ m3u_stream M3u8Handler::parseM3u(const std::string &webUri, int useYtdlp) {
4444
// if useYtdlp == 2 then get the page and try to find the real m3u8 URL
4545
if (useYtdlp==1) {
4646
std::vector<std::string> callStr{
47-
IptvConfig.GetYtdlpPath(), "--get-url", webUri
47+
IptvConfig.GetYtdlpPath(), "--get-url",
48+
"-f", "(bv*[vcodec~='^((he|a)vc|h26[45])']+ba[ext=m4a]/b[ext=mp4])", webUri
4849
};
4950

5051
std::string newUri;

po/ca_ES.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
10+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Gabriel Bonich <[email protected]>\n"
1313
"Language-Team: Catalan <[email protected]>\n"
@@ -136,6 +136,9 @@ msgstr "EXT"
136136
msgid "M3U"
137137
msgstr "M3U"
138138

139+
msgid "M3US"
140+
msgstr "M3US"
141+
139142
msgid "RADIO"
140143
msgstr "RADIO"
141144

po/de_DE.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: vdr-iptv 2.4.0\n"
1010
"Report-Msgid-Bugs-To: <see README>\n"
11-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
11+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1212
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1313
"Last-Translator: Frank Neumann <[email protected]>\n"
1414
"Language-Team: German <[email protected]>\n"
@@ -137,6 +137,9 @@ msgstr "EXT"
137137
msgid "M3U"
138138
msgstr "M3U"
139139

140+
msgid "M3US"
141+
msgstr "M3US"
142+
140143
msgid "RADIO"
141144
msgstr "RADIO"
142145

po/es_ES.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
10+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Gabriel Bonich <[email protected]>\n"
1313
"Language-Team: Spanish <[email protected]>\n"
@@ -136,6 +136,9 @@ msgstr "EXT"
136136
msgid "M3U"
137137
msgstr "M3U"
138138

139+
msgid "M3US"
140+
msgstr "M3US"
141+
139142
msgid "RADIO"
140143
msgstr "RADIO"
141144

po/fi_FI.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
10+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Rolf Ahrenberg\n"
1313
"Language-Team: Finnish <[email protected]>\n"
@@ -135,6 +135,9 @@ msgstr "EXT"
135135
msgid "M3U"
136136
msgstr "M3U"
137137

138+
msgid "M3US"
139+
msgstr "M3US"
140+
138141
msgid "RADIO"
139142
msgstr "RADIO"
140143

po/fr_FR.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: vdr-iptv 2.4.0\n"
1010
"Report-Msgid-Bugs-To: <see README>\n"
11-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
11+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1212
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1313
"Last-Translator: NIVAL Michaël <[email protected]>\n"
1414
"Language-Team: French <[email protected]>\n"
@@ -137,6 +137,9 @@ msgstr "EXT"
137137
msgid "M3U"
138138
msgstr "M3U"
139139

140+
msgid "M3US"
141+
msgstr "M3US"
142+
140143
msgid "RADIO"
141144
msgstr "RADIO"
142145

po/it_IT.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
10+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Diego Pierotto <[email protected]>\n"
1313
"Language-Team: Italian <[email protected]>\n"
@@ -136,6 +136,9 @@ msgstr "EXT"
136136
msgid "M3U"
137137
msgstr "M3U"
138138

139+
msgid "M3US"
140+
msgstr "M3US"
141+
139142
msgid "RADIO"
140143
msgstr "RADIO"
141144

po/lt_LT.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
10+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Valdemaras Pipiras\n"
1313
"Language-Team: Lithuanian <[email protected]>\n"
@@ -135,6 +135,9 @@ msgstr "EXT"
135135
msgid "M3U"
136136
msgstr "M3U"
137137

138+
msgid "M3US"
139+
msgstr "M3US"
140+
138141
msgid "RADIO"
139142
msgstr "RADIO"
140143

po/nl_NL.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
10+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Carel\n"
1313
"Language-Team: Dutch <[email protected]>\n"
@@ -135,6 +135,9 @@ msgstr "EXT"
135135
msgid "M3U"
136136
msgstr "M3U"
137137

138+
msgid "M3US"
139+
msgstr "M3US"
140+
138141
msgid "RADIO"
139142
msgstr "RADIO"
140143

po/pl_PL.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
10+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Tomasz Maciej Nowak <[email protected]>\n"
1313
"Language-Team: Polish <[email protected]>\n"
@@ -136,6 +136,9 @@ msgstr "EXT"
136136
msgid "M3U"
137137
msgstr "M3U"
138138

139+
msgid "M3US"
140+
msgstr "M3US"
141+
139142
msgid "RADIO"
140143
msgstr "RADIO"
141144

po/ru_RU.po

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: vdr-iptv 2.4.0\n"
99
"Report-Msgid-Bugs-To: <see README>\n"
10-
"POT-Creation-Date: 2024-08-18 15:44+0200\n"
10+
"POT-Creation-Date: 2024-09-01 12:35+0200\n"
1111
"PO-Revision-Date: 2018-04-15 04:15+0300\n"
1212
"Last-Translator: Alexander Gross <[email protected]>\n"
1313
"Language-Team: Russian <[email protected]>\n"
@@ -127,6 +127,9 @@ msgstr "EXT"
127127
msgid "M3U"
128128
msgstr "M3U"
129129

130+
msgid "M3US"
131+
msgstr "M3US"
132+
130133
msgid "RADIO"
131134
msgstr "RADIO"
132135

protocolif.h

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#pragma once
99

1010
typedef struct {
11+
int protocol;
1112
const char *locationP;
1213
int parameterP;
1314
unsigned int indexP;

protocolm3u.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ cIptvProtocolM3U::SetSource(SourceParameter parameter) {
9090

9191
this->useYtdlp = parameter.useYtDlp;
9292

93-
url = findUrl(parameter.parameterP, parameter.locationP);
93+
if (parameter.protocol == cIptvTransponderParameters::eProtocolM3U) {
94+
url = findUrl(parameter.parameterP, parameter.locationP);
95+
} else if (parameter.protocol == cIptvTransponderParameters::eProtocolM3US) {
96+
url = ReplaceAll(parameter.locationP, "%3A", ":");
97+
url = ReplaceAll(url, "%7C", "|");
98+
}
9499

95100
if (url.empty()) {
96101
return false;

protocolm3u.h

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "protocolif.h"
77
#include "m3u8handler.h"
88
#include "streambasehandler.h"
9+
#include "source.h"
910

1011
class cIptvProtocolM3U : public cIptvProtocolIf {
1112
private:

source.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ int cIptvTransponderParameters::StrToProtocol(const char *prot) {
6363
protocolM = eProtocolFILE;
6464
} else if (strstr(prot, "EXT")) {
6565
protocolM = eProtocolEXT;
66+
} else if (strstr(prot, "M3US")) {
67+
protocolM = eProtocolM3US;
6668
} else if (strstr(prot, "M3U")) {
6769
protocolM = eProtocolM3U;
6870
} else if (strstr(prot, "RADIO")) {
@@ -98,6 +100,10 @@ std::string cIptvTransponderParameters::ProtocolToStr(int prot) {
98100
protocolstr = "M3U";
99101
break;
100102

103+
case eProtocolM3US:
104+
protocolstr = "M3US";
105+
break;
106+
101107
case eProtocolRadio:
102108
protocolstr = "RADIO";
103109
break;
@@ -222,6 +228,7 @@ cIptvSourceParam::cIptvSourceParam(char sourceP, const char *descriptionP)
222228
protocolsM[cIptvTransponderParameters::eProtocolFILE] = tr("FILE");
223229
protocolsM[cIptvTransponderParameters::eProtocolEXT] = tr("EXT");
224230
protocolsM[cIptvTransponderParameters::eProtocolM3U] = tr("M3U");
231+
protocolsM[cIptvTransponderParameters::eProtocolM3US] = tr("M3US");
225232
protocolsM[cIptvTransponderParameters::eProtocolRadio] = tr("RADIO");
226233
protocolsM[cIptvTransponderParameters::eProtocolStream] = tr("STREAM");
227234
}

source.h

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class cIptvTransponderParameters {
3232
eProtocolFILE,
3333
eProtocolEXT,
3434
eProtocolM3U,
35+
eProtocolM3US,
3536
eProtocolRadio,
3637
eProtocolStream,
3738
eProtocolCount

0 commit comments

Comments
 (0)