diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-05-26 04:39:33 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-05-26 04:39:33 +0000 |
commit | bc0d3d581e4bf62e1afda4455612ab25951e0b5f (patch) | |
tree | 2e14c13b2cf5edfa0197a605fe6df2034b44f61b /lib | |
parent | c2a57645536f71cc206d658484359d477b454677 (diff) | |
download | ampache-bc0d3d581e4bf62e1afda4455612ab25951e0b5f.tar.gz ampache-bc0d3d581e4bf62e1afda4455612ab25951e0b5f.tar.bz2 ampache-bc0d3d581e4bf62e1afda4455612ab25951e0b5f.zip |
fixed get_url
Diffstat (limited to 'lib')
-rw-r--r-- | lib/class/song.class.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php index d1a985b4..bc86c922 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -723,8 +723,16 @@ class Song { if ($song->type == 'flac') { $type = 'ogg'; } $this->format_song(); $song_name = rawurlencode($this->f_artist_full . " - " . $this->title . "." . $this->type); - - $url = conf('web_path') . "/play/index.php?song=$song_id&uid=$username$session_string$ds_string&name=$song_name"; + + $web_path = conf('web_path'); + + if (conf('force_http_play')) { + $port = conf('http_port'); + $web_path = preg_replace("/https/", "http",$web_path); + $web_path = preg_replace("/:\d+/",":$port",$web_path); + } + + $url = $web_path . "/play/index.php?song=$song_id&uid=$username$session_string$ds_string&name=$song_name"; return $url; |