-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jp jukebox activesong #1128
Jp jukebox activesong #1128
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -235,6 +235,27 @@ public function getTitle() | |
return $this->title; | ||
} | ||
|
||
public function getPlaylistAtTime($time) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What will this do if there are multiple active playlists at a time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just return one of them. This shouldn't matter as we are planning to move to only having a single active playlist at any point. |
||
{ | ||
$getplaylist = self::$db->fetchColumn( | ||
'SELECT playlist.playlistid | ||
FROM jukebox.playlists playlist | ||
INNER JOIN jukebox.playlist_availability avail ON playlist.playlistid=avail.playlistid | ||
WHERE playlist.category=2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have a |
||
AND archived=false | ||
AND avail.playlist_availability_id IN ( | ||
SELECT playlist_availability_id | ||
FROM jukebox.playlist_timeslot | ||
WHERE \''.$time.'\' | ||
BETWEEN start_time | ||
AND end_time | ||
|
||
GROUP BY playlist_availability_id | ||
)'); | ||
return $getplaylist[0]; | ||
//return $current_time; | ||
} | ||
|
||
/** | ||
* Get the unique playlistid of the Playlist. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.