summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-02-11 07:42:32 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-02-11 07:42:32 +0000
commitd148c82cd2853fd954f63b7f23e0aa9bb98ff175 (patch)
tree8934dbbfd72772921cf84a1f0822361f48a5c32c
parent949d7bb12fe9de9ccf3d2958bccde4354ab04d9b (diff)
downloadampache-d148c82cd2853fd954f63b7f23e0aa9bb98ff175.tar.gz
ampache-d148c82cd2853fd954f63b7f23e0aa9bb98ff175.tar.bz2
ampache-d148c82cd2853fd954f63b7f23e0aa9bb98ff175.zip
fix for the tv play democratic play to stream having some extra junk at the end of the m3u
-rw-r--r--lib/general.lib.php13
-rw-r--r--tv.php1
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php
index deb8e176..c975ed22 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -1019,5 +1019,18 @@ function get_plugins() {
} // get_plugins
+/**
+ * unhtmlentities
+ * This is required to make thing work.. but holycrap is it ugly
+ */
+function unhtmlentities ($string) {
+
+ $trans_tbl = get_html_translation_table (HTML_ENTITIES);
+ $trans_tbl = array_flip ($trans_tbl);
+ $ret = strtr ($string, $trans_tbl);
+ return preg_replace('/&#(\d+);/me', "chr('\\1')",$ret);
+
+} // unhtmlentities
+
?>
diff --git a/tv.php b/tv.php
index 90ab4ff7..e41fb0e3 100644
--- a/tv.php
+++ b/tv.php
@@ -75,6 +75,7 @@ switch ($action) {
$stream = new Stream($stream_type,array());
$stream->manual_url_add(unhtmlentities($tmp_playlist->get_vote_url()));
$stream->start();
+ if ($stream_type != 'localplay') { exit; }
break;
case 'update_playlist':
/* Only Admins Here */