summaryrefslogtreecommitdiffstats
path: root/lib/class/song.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r--lib/class/song.class.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index b437692a..f72506f8 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -708,13 +708,18 @@ class Song {
* a stream URL taking into account the downsampling mojo and everything
* else, this is used or will be used by _EVERYTHING_
*/
- function get_url() {
+ function get_url($session_id='') {
/* Define Variables we are going to need */
$username = $GLOBALS['user']->username;
$song_id = $this->id;
if (conf('require_session')) {
- $session_string = "&sid=" . session_id();
+ if ($session_id) {
+ $session_string = "&sid=" . $session_id;
+ }
+ else {
+ $session_string = "&sid=" . session_id();
+ }
} // if they are requiring a session
$type = $this->type;