diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-02-02 04:25:25 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-02-02 04:25:25 +0000 |
commit | 00effbf55451016e5863e27de93344dfb4a50216 (patch) | |
tree | fe1300051d65f14fd34dd53bc7148a47c8e3d5a6 /lib/class/stream.class.php | |
parent | 0a2b41b143419e85b968a675c8b83a1c15615399 (diff) | |
download | ampache-00effbf55451016e5863e27de93344dfb4a50216.tar.gz ampache-00effbf55451016e5863e27de93344dfb4a50216.tar.bz2 ampache-00effbf55451016e5863e27de93344dfb4a50216.zip |
Add very basic buggy as crap video support, fix a few other minor bugs with playlists and random elements
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r-- | lib/class/stream.class.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 61a91abc..9de66510 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -751,6 +751,34 @@ class Stream { } // run_playlist_method + /** + * get_base_url + * This returns the base requirements for a stream URL this does not include anything after the index.php?sid=???? + */ + public static function get_base_url($session_id='',$force_http='') { + + if (Config::get('require_session')) { + $session_string = 'sid=' . Stream::get_session() . '&'; + } + + $web_path = Config::get('web_path'); + + if (Config::get('force_http_play') OR !empty($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); + } + } + + $url = $web_path . "/play/index.php?$session_string"; + + return $url; + + } // get_base_url + } //end of stream class ?> |