mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
added Network Media Tank browser support to HTML pages (#494)
This commit is contained in:
parent
cd8d7fbd6c
commit
ca043780a7
@ -101,3 +101,4 @@ wirbel
|
|||||||
|
|
||||||
Jori Hamalainen
|
Jori Hamalainen
|
||||||
for extensive testing while making stream compatible to Network Media Tank
|
for extensive testing while making stream compatible to Network Media Tank
|
||||||
|
for adding Network Media Tank browser support to HTML pages
|
||||||
|
2
HISTORY
2
HISTORY
@ -1,6 +1,8 @@
|
|||||||
VDR Plugin 'streamdev' Revision History
|
VDR Plugin 'streamdev' Revision History
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
|
- added Network Media Tank browser support to HTML pages (thanks to Jori
|
||||||
|
Hamalainen)
|
||||||
- minor fixes of PAT repacker
|
- minor fixes of PAT repacker
|
||||||
- repack and send every PAT packet we receive
|
- repack and send every PAT packet we receive
|
||||||
- fixed null pointer in server.c when cConnection::Accept() failes
|
- fixed null pointer in server.c when cConnection::Accept() failes
|
||||||
|
@ -112,10 +112,10 @@ const cChannel* cChannelList::GetGroup(int Index)
|
|||||||
|
|
||||||
// ******************** cHtmlChannelList ******************
|
// ******************** cHtmlChannelList ******************
|
||||||
const char* cHtmlChannelList::menu =
|
const char* cHtmlChannelList::menu =
|
||||||
"[<a href=\"/\">Home</a> (<a href=\"all.html\">no script</a>)] "
|
"[<a href=\"/\">Home</a> (<a href=\"all.html\" tvid=\"RED\">no script</a>)] "
|
||||||
"[<a href=\"tree.html\">Tree View</a>] "
|
"[<a href=\"tree.html\" tvid=\"GREEN\">Tree View</a>] "
|
||||||
"[<a href=\"groups.html\">Groups</a> (<a href=\"groups.m3u\">Playlist</a>)] "
|
"[<a href=\"groups.html\" tvid=\"YELLOW\">Groups</a> (<a href=\"groups.m3u\">Playlist</a>)] "
|
||||||
"[<a href=\"channels.html\">Channels</a> (<a href=\"channels.m3u\">Playlist</a>)] ";
|
"[<a href=\"channels.html\" tvid=\"BLUE\">Channels</a> (<a href=\"channels.m3u\">Playlist</a>)] ";
|
||||||
|
|
||||||
const char* cHtmlChannelList::css =
|
const char* cHtmlChannelList::css =
|
||||||
"<style type=\"text/css\">\n"
|
"<style type=\"text/css\">\n"
|
||||||
@ -336,9 +336,24 @@ std::string cHtmlChannelList::GroupTitle()
|
|||||||
std::string cHtmlChannelList::ItemText()
|
std::string cHtmlChannelList::ItemText()
|
||||||
{
|
{
|
||||||
std::string line;
|
std::string line;
|
||||||
|
std::string suffix;
|
||||||
|
|
||||||
|
switch (streamType) {
|
||||||
|
case stTS: suffix = (std::string) ".ts"; break;
|
||||||
|
case stPS: suffix = (std::string) ".vob"; break;
|
||||||
|
// for Network Media Tank
|
||||||
|
case stPES: suffix = (std::string) ".vdr"; break;
|
||||||
|
default: suffix = "";
|
||||||
|
}
|
||||||
line += (std::string) "<li value=\"" + (const char*) itoa(current->Number()) + "\">";
|
line += (std::string) "<li value=\"" + (const char*) itoa(current->Number()) + "\">";
|
||||||
line += (std::string) "<a href=\"" + (std::string) current->GetChannelID().ToString() + "\">" +
|
line += (std::string) "<a href=\"" + (std::string) current->GetChannelID().ToString() + suffix + "\"";
|
||||||
current->Name() + "</a>";
|
|
||||||
|
// 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;
|
int count = 0;
|
||||||
for (int i = 0; current->Apid(i) != 0; ++i, ++count)
|
for (int i = 0; current->Apid(i) != 0; ++i, ++count)
|
||||||
@ -351,11 +366,11 @@ std::string cHtmlChannelList::ItemText()
|
|||||||
int index = 1;
|
int index = 1;
|
||||||
for (int i = 0; current->Apid(i) != 0; ++i, ++index) {
|
for (int i = 0; current->Apid(i) != 0; ++i, ++index) {
|
||||||
line += (std::string) " <a href=\"" + (std::string) current->GetChannelID().ToString() +
|
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) {
|
for (int i = 0; current->Dpid(i) != 0; ++i, ++index) {
|
||||||
line += (std::string) " <a href=\"" + (std::string) current->GetChannelID().ToString() +
|
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>";
|
line += "</li>";
|
||||||
|
Loading…
Reference in New Issue
Block a user