summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmirl <schmirl>2008-12-08 11:37:21 +0000
committerschmirl <schmirl>2008-12-08 11:37:21 +0000
commitca043780a7d81b3766a42aa105eaaa3ff2c6bc70 (patch)
treee024a370c521e98775e3c2f5914a4567eab45a51
parentcd8d7fbd6c583b81b04d082e100021eedf045283 (diff)
downloadvdr-plugin-streamdev-ca043780a7d81b3766a42aa105eaaa3ff2c6bc70.tar.gz
vdr-plugin-streamdev-ca043780a7d81b3766a42aa105eaaa3ff2c6bc70.tar.bz2
added Network Media Tank browser support to HTML pages (#494)
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--server/menuHTTP.c31
3 files changed, 26 insertions, 8 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index a1edc6c..af2e2b5 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -101,3 +101,4 @@ wirbel
Jori Hamalainen
for extensive testing while making stream compatible to Network Media Tank
+ for adding Network Media Tank browser support to HTML pages
diff --git a/HISTORY b/HISTORY
index 30eb6ba..7b14463 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,8 @@
VDR Plugin 'streamdev' Revision History
---------------------------------------
+- added Network Media Tank browser support to HTML pages (thanks to Jori
+ Hamalainen)
- minor fixes of PAT repacker
- repack and send every PAT packet we receive
- fixed null pointer in server.c when cConnection::Accept() failes
diff --git a/server/menuHTTP.c b/server/menuHTTP.c
index 89ca070..8d3e404 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"
@@ -336,9 +336,24 @@ 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;
+ // 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) "<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 +366,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>";