summaryrefslogtreecommitdiffstats
path: root/lib/class/stream.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-04-13 15:45:00 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-04-13 15:45:00 +0000
commitd3728b89e060bbdc32f1447d6ea79b19dd7746e8 (patch)
tree21b7864f0b852e8bb48633a5560651dfe7870cce /lib/class/stream.class.php
parent45f4f58b1eaaeee61e92086087c7bb203eff896c (diff)
downloadampache-d3728b89e060bbdc32f1447d6ea79b19dd7746e8.tar.gz
ampache-d3728b89e060bbdc32f1447d6ea79b19dd7746e8.tar.bz2
ampache-d3728b89e060bbdc32f1447d6ea79b19dd7746e8.zip
tweaked fix for rss feed, makes it a little cleaner, fix custom port issue add debug event on unreadable, but still existing files
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r--lib/class/stream.class.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index 022e1e55..8b298917 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -863,14 +863,16 @@ class Stream {
$web_path = Config::get('web_path');
if (Config::get('force_http_play') OR !empty(self::$force_http)) {
- $port = Config::get('http_port');
- if (preg_match("/:\d+/",$web_path)) {
- $web_path = str_replace("https://", "http://",$web_path);
- }
- else {
- $web_path = str_replace("https://", "http://",$web_path);
- }
+ $web_path = str_replace("https://", "http://",$web_path);
}
+ if (Config::get('http_port') != '80') {
+ if (preg_match("/:(\d+)/",$web_path,$matches)) {
+ $web_path = str_replace(':' . $matches['1'],':' . Config::get('http_port'),$web_path);
+ }
+ else {
+ $web_path = str_replace($_SERVER['HTTP_HOST'],$_SERVER['HTTP_HOST'] . ':' . Config::get('http_port'),$web_path);
+ }
+ }
$url = $web_path . "/play/index.php?$session_string";