summaryrefslogtreecommitdiff
path: root/server/menuHTTP.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/menuHTTP.c')
-rw-r--r--server/menuHTTP.c45
1 files changed, 29 insertions, 16 deletions
diff --git a/server/menuHTTP.c b/server/menuHTTP.c
index b5bb299..41b1f10 100644
--- a/server/menuHTTP.c
+++ b/server/menuHTTP.c
@@ -112,10 +112,10 @@ const cChannel* cChannelList::GetGroup(int Index)
// ******************** cHtmlChannelList ******************
const char* cHtmlChannelList::menu =
- "[<a href=\"/\">Home</a> (<a href=\"all.html\">no script</a>)] "
- "[<a href=\"tree.html\">Tree View</a>] "
- "[<a href=\"groups.html\">Groups</a> (<a href=\"groups.m3u\">Playlist</a>)] "
- "[<a href=\"channels.html\">Channels</a> (<a href=\"channels.m3u\">Playlist</a>)] ";
+ "[<a href=\"/\">Home</a> (<a href=\"all.html\" tvid=\"RED\">no script</a>)] "
+ "[<a href=\"tree.html\" tvid=\"GREEN\">Tree View</a>] "
+ "[<a href=\"groups.html\" tvid=\"YELLOW\">Groups</a> (<a href=\"groups.m3u\">Playlist</a>)] "
+ "[<a href=\"channels.html\" tvid=\"BLUE\">Channels</a> (<a href=\"channels.m3u\">Playlist</a>)] ";
const char* cHtmlChannelList::css =
"<style type=\"text/css\">\n"
@@ -201,8 +201,10 @@ std::string cHtmlChannelList::StreamTypeMenu()
(std::string) "[<a href=\"/TS/" + self + "\">TS</a>] ");
typeMenu += (streamType == stPS ? (std::string) "[PS] " :
(std::string) "[<a href=\"/PS/" + self + "\">PS</a>] ");
+#if APIVERSNUM < 10703
typeMenu += (streamType == stPES ? (std::string) "[PES] " :
(std::string) "[<a href=\"/PES/" + self + "\">PES</a>] ");
+#endif
typeMenu += (streamType == stES ? (std::string) "[ES] " :
(std::string) "[<a href=\"/ES/" + self + "\">ES</a>] ");
typeMenu += (streamType == stExtern ? (std::string) "[Extern] " :
@@ -336,9 +338,26 @@ std::string cHtmlChannelList::GroupTitle()
std::string cHtmlChannelList::ItemText()
{
std::string line;
+ std::string suffix;
+
+ switch (streamType) {
+ case stTS: suffix = (std::string) ".ts"; break;
+ case stPS: suffix = (std::string) ".vob"; break;
+#if APIVERSNUM < 10703
+ // for Network Media Tank
+ case stPES: suffix = (std::string) ".vdr"; break;
+#endif
+ default: suffix = "";
+ }
line += (std::string) "<li value=\"" + (const char*) itoa(current->Number()) + "\">";
- line += (std::string) "<a href=\"" + (std::string) current->GetChannelID().ToString() + "\">" +
- current->Name() + "</a>";
+ line += (std::string) "<a href=\"" + (std::string) current->GetChannelID().ToString() + suffix + "\"";
+
+ // for Network Media Tank
+ line += (std::string) " vod ";
+ if (current->Number() < 1000)
+ line += (std::string) " tvid=\"" + (const char*) itoa(current->Number()) + "\"";
+
+ line += (std::string) ">" + current->Name() + "</a>";
int count = 0;
for (int i = 0; current->Apid(i) != 0; ++i, ++count)
@@ -351,11 +370,11 @@ std::string cHtmlChannelList::ItemText()
int index = 1;
for (int i = 0; current->Apid(i) != 0; ++i, ++index) {
line += (std::string) " <a href=\"" + (std::string) current->GetChannelID().ToString() +
- "+" + (const char*)itoa(index) + "\" class=\"apid\">" + current->Alang(i) + "</a>";
+ "+" + (const char*)itoa(index) + suffix + "\" class=\"apid\" vod>" + current->Alang(i) + "</a>";
}
for (int i = 0; current->Dpid(i) != 0; ++i, ++index) {
line += (std::string) " <a href=\"" + (std::string) current->GetChannelID().ToString() +
- "+" + (const char*)itoa(index) + "\" class=\"dpid\">" + current->Dlang(i) + "</a>";
+ "+" + (const char*)itoa(index) + suffix + "\" class=\"dpid\" vod>" + current->Dlang(i) + "</a>";
}
}
line += "</li>";
@@ -364,10 +383,8 @@ std::string cHtmlChannelList::ItemText()
// ******************** cM3uChannelList ******************
cM3uChannelList::cM3uChannelList(cChannelIterator *Iterator, const char* Base)
-: cChannelList(Iterator)
-#if defined(APIVERSNUM) && APIVERSNUM >= 10503
- , m_IConv(cCharSetConv::SystemCharacterTable(), "UTF-8")
-#endif
+: cChannelList(Iterator),
+ m_IConv(cCharSetConv::SystemCharacterTable(), "UTF-8")
{
base = strdup(Base);
m3uState = msFirst;
@@ -398,11 +415,7 @@ std::string cM3uChannelList::Next()
return "";
}
-#if defined(APIVERSNUM) && APIVERSNUM >= 10503
std::string name = (std::string) m_IConv.Convert(channel->Name());
-#else
- std::string name = channel->Name();
-#endif
if (channel->GroupSep())
{