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 | |
parent | c2a57645536f71cc206d658484359d477b454677 (diff) | |
download | ampache-bc0d3d581e4bf62e1afda4455612ab25951e0b5f.tar.gz ampache-bc0d3d581e4bf62e1afda4455612ab25951e0b5f.tar.bz2 ampache-bc0d3d581e4bf62e1afda4455612ab25951e0b5f.zip |
fixed get_url
-rwxr-xr-x | docs/CHANGELOG | 3 | ||||
-rw-r--r-- | lib/class/song.class.php | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 243858d7..116b6caa 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,9 @@ -------------------------------------------------------------------------- v.3.3.2-Beta3 + - Fixed an issue where the new song->get_url() wasn't respecting + the force_http_play, this also fixes a long outstanding + bug with localplay + https + force_http_play - Added PCRE check on /test.php and updated to use Ros's new spiffy theme - Added pruning of empty playlists (Admin Only) 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; |