zapit/bouquets: rename marker defines

Origin commit data
------------------
Branch: ni/coolstream
Commit: 9460a09951
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-05-04 (Thu, 04 May 2023)

Origin message was:
------------------
- zapit/bouquets: rename marker defines

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2023-05-04 21:59:48 +02:00
parent 1e4609f115
commit 17105ed709

View File

@@ -49,26 +49,29 @@
#include <zapit/zapit.h> #include <zapit/zapit.h>
#include <xmlinterface.h> #include <xmlinterface.h>
#define M3U_START_MARKER "#EXTM3U" #define M3U_START_MARKER "#EXTM3U"
#define M3U_START_EPG_MARKER "tvg-url=" #define M3U_INFO_MARKER "#EXTINF"
#define M3U_INFO_MARKER "#EXTINF"
#define TVG_INFO_ID_MARKER "tvg-id=" #define TVG_URL_MARKER "tvg-url="
#define TVG_INFO_NAME_MARKER "tvg-name=" #define X_TVG_URL_MARKER "x-tvg-url="
#define TVG_INFO_LOGO_MARKER "tvg-logo=" #define TVG_ID_MARKER "tvg-id="
#define TVG_INFO_SCRIPT_MARKER "tvg-script=" #define TVG_NAME_MARKER "tvg-name="
#define TVG_INFO_SHIFT_MARKER "tvg-shift=" #define TVG_LOGO_MARKER "tvg-logo="
#define GROUP_PREFIX_MARKER "group-prefix=" #define TVG_SCRIPT_MARKER "tvg-script="
#define GROUP_NAME_MARKER "group-title=" #define TVG_SHIFT_MARKER "tvg-shift="
#define GROUP_PREFIX_MARKER "group-prefix="
#define GROUP_NAME_MARKER "group-title="
extern CBouquetManager *g_bouquetManager; extern CBouquetManager *g_bouquetManager;
extern CPictureViewer *g_PicViewer; extern CPictureViewer *g_PicViewer;
#define GET_ATTR(node, name, fmt, arg) \ #define GET_ATTR(node, name, fmt, arg) \
do { \ do { \
const char * ptr = xmlGetAttribute(node, name); \ const char * ptr = xmlGetAttribute(node, name); \
if ((ptr == NULL) || (sscanf(ptr, fmt, &arg) <= 0)) \ if ((ptr == NULL) || (sscanf(ptr, fmt, &arg) <= 0)) \
arg = 0; \ arg = 0; \
} \ } \
while (0) while (0)
/**** class CBouquet ********************************************************/ /**** class CBouquet ********************************************************/
@@ -1009,10 +1012,10 @@ void CBouquetManager::loadWebchannels(int mode)
std::ifstream infile; std::ifstream infile;
char cLine[1024]; char cLine[1024];
std::string epg_url = ""; std::string epg_url = "";
std::string desc = "";
std::string title = ""; std::string title = "";
std::string prefix = ""; std::string prefix = "";
std::string group = ""; std::string group = "";
std::string desc = "";
std::string epgid = ""; std::string epgid = "";
std::string alogo = ""; std::string alogo = "";
std::string script = ""; std::string script = "";
@@ -1034,9 +1037,9 @@ void CBouquetManager::loadWebchannels(int mode)
if (strLine.find(M3U_START_MARKER) != std::string::npos) if (strLine.find(M3U_START_MARKER) != std::string::npos)
{ {
epg_url = ""; epg_url = "";
epg_url = ReadMarkerValue(strLine, M3U_START_EPG_MARKER); epg_url = ReadMarkerValue(strLine, TVG_URL_MARKER);
if (epg_url.empty()) if (epg_url.empty())
epg_url = ReadMarkerValue(strLine, "x-tvg-url"); epg_url = ReadMarkerValue(strLine, X_TVG_URL_MARKER);
//printf("tvg-url: %s\n", epg_url.c_str()); //printf("tvg-url: %s\n", epg_url.c_str());
if (!epg_url.empty()) if (!epg_url.empty())
{ {
@@ -1058,6 +1061,7 @@ void CBouquetManager::loadWebchannels(int mode)
prefix = ""; prefix = "";
group = ""; group = "";
desc = ""; desc = "";
epgid = "";
alogo = ""; alogo = "";
script = ""; script = "";
@@ -1067,12 +1071,12 @@ void CBouquetManager::loadWebchannels(int mode)
iColon++; iColon++;
title = strLine.substr(iComma); title = strLine.substr(iComma);
std::string strInfoLine = strLine.substr(iColon, --iComma - iColon); std::string strInfoLine = strLine.substr(iColon, --iComma - iColon);
desc = ReadMarkerValue(strInfoLine, TVG_INFO_NAME_MARKER);
prefix = ReadMarkerValue(strInfoLine, GROUP_PREFIX_MARKER); prefix = ReadMarkerValue(strInfoLine, GROUP_PREFIX_MARKER);
group = ReadMarkerValue(strInfoLine, GROUP_NAME_MARKER); group = ReadMarkerValue(strInfoLine, GROUP_NAME_MARKER);
epgid = ReadMarkerValue(strInfoLine, TVG_INFO_ID_MARKER); desc = ReadMarkerValue(strInfoLine, TVG_NAME_MARKER);
alogo = ReadMarkerValue(strInfoLine, TVG_INFO_LOGO_MARKER); epgid = ReadMarkerValue(strInfoLine, TVG_ID_MARKER);
script = ReadMarkerValue(strInfoLine, TVG_INFO_SCRIPT_MARKER); alogo = ReadMarkerValue(strInfoLine, TVG_LOGO_MARKER);
script = ReadMarkerValue(strInfoLine, TVG_SCRIPT_MARKER);
} }
pbouquet = addBouquetIfNotExist((mode == MODE_WEBTV) ? "WebTV" : "WebRadio"); pbouquet = addBouquetIfNotExist((mode == MODE_WEBTV) ? "WebTV" : "WebRadio");