summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-08-31 15:57:33 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-08-31 15:57:33 +0000
commitc2e9b311e92f4b1e952f752c5177a92c5704c345 (patch)
treeae697620203e077aec8c182829e529e2f0d809f7 /modules
parent4b309a5f02490bb1a62ebcd61aed8935671d1cd8 (diff)
downloadampache-c2e9b311e92f4b1e952f752c5177a92c5704c345.tar.gz
ampache-c2e9b311e92f4b1e952f752c5177a92c5704c345.tar.bz2
ampache-c2e9b311e92f4b1e952f752c5177a92c5704c345.zip
remove lib/album.lib.php and move its two functions into album class, corrected some old php4 ish code in localplay controllers, removed redundent link from sidebar (modules)
Diffstat (limited to 'modules')
-rw-r--r--modules/localplay/httpq.controller.php28
-rw-r--r--modules/localplay/mpd.controller.php27
2 files changed, 29 insertions, 26 deletions
diff --git a/modules/localplay/httpq.controller.php b/modules/localplay/httpq.controller.php
index fe279b5b..dd26fa6c 100644
--- a/modules/localplay/httpq.controller.php
+++ b/modules/localplay/httpq.controller.php
@@ -312,7 +312,7 @@ class AmpacheHttpq extends localplay_controller {
* clear_playlist
* This deletes the entire Httpq playlist... nuff said
*/
- function clear_playlist() {
+ public function clear_playlist() {
if (is_null($this->_httpq->clear())) { return false; }
@@ -358,7 +358,7 @@ class AmpacheHttpq extends localplay_controller {
* skip
* This tells HttpQ to skip to the specified song
*/
- function skip($song) {
+ public function skip($song) {
if (is_null($this->_httpq->skip($song))) { return false; }
return true;
@@ -368,7 +368,7 @@ class AmpacheHttpq extends localplay_controller {
/**
* This tells Httpq to increase the volume by WinAmps default amount
*/
- function volume_up() {
+ public function volume_up() {
if (is_null($this->_httpq->volume_up())) { return false; }
return true;
@@ -378,7 +378,7 @@ class AmpacheHttpq extends localplay_controller {
/**
* This tells HttpQ to decrease the volume by Winamps default amount
*/
- function volume_down() {
+ public function volume_down() {
if (is_null($this->_httpq->volume_down())) { return false; }
return true;
@@ -387,9 +387,9 @@ class AmpacheHttpq extends localplay_controller {
/**
* next
- * This just tells MPD to skip to the next song
+ * This just tells HttpQ to skip to the next song
*/
- function next() {
+ public function next() {
if (is_null($this->_httpq->next())) { return false; }
@@ -399,9 +399,9 @@ class AmpacheHttpq extends localplay_controller {
/**
* prev
- * This just tells MPD to skip to the prev song
+ * This just tells HttpQ to skip to the prev song
*/
- function prev() {
+ public function prev() {
if (is_null($this->_httpq->prev())) { return false; }
@@ -411,9 +411,9 @@ class AmpacheHttpq extends localplay_controller {
/**
* pause
- * This tells MPD to pause the current song
+ * This tells HttpQ to pause the current song
*/
- function pause() {
+ public function pause() {
if (is_null($this->_httpq->pause())) { return false; }
return true;
@@ -425,7 +425,7 @@ class AmpacheHttpq extends localplay_controller {
* This tells HttpQ to set the volume to the specified amount this
* is 0-100
*/
- function volume($volume) {
+ public function volume($volume) {
if (is_null($this->_httpq->set_volume($volume))) { return false; }
return true;
@@ -477,6 +477,7 @@ class AmpacheHttpq extends localplay_controller {
$data['raw'] = $entry;
$url_data = $this->parse_url($entry);
+
switch ($url_data['primary_key']) {
case 'song':
$song = new Song($url_data['song']);
@@ -489,6 +490,10 @@ class AmpacheHttpq extends localplay_controller {
$data['name'] = _('Democratic') . ' - ' . $democratic->name;
$data['link'] = '';
break;
+ case 'random':
+ $data['name'] = _('Random') . ' - ' . scrub_out(ucfirst($url_data['type']));
+ $data['link'] = '';
+ break;
default:
/* If we don't know it, look up by filename */
@@ -509,7 +514,6 @@ class AmpacheHttpq extends localplay_controller {
break;
} // end switch on primary key type
-
$data['track'] = $key+1;
$results[] = $data;
diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php
index cc7a564c..08b790b1 100644
--- a/modules/localplay/mpd.controller.php
+++ b/modules/localplay/mpd.controller.php
@@ -313,7 +313,7 @@ class AmpacheMpd extends localplay_controller {
* clear_playlist
* This deletes the entire MPD playlist... nuff said
*/
- function clear_playlist() {
+ public function clear_playlist() {
if (is_null($this->_mpd->PLClear())) { return false; }
@@ -326,7 +326,7 @@ class AmpacheMpd extends localplay_controller {
* This just tells MPD to start playing, it does not
* take any arguments
*/
- function play() {
+ public function play() {
if (is_null($this->_mpd->Play())) { return false; }
return true;
@@ -338,7 +338,7 @@ class AmpacheMpd extends localplay_controller {
* This just tells MPD to stop playing, it does not take
* any arguments
*/
- function stop() {
+ public function stop() {
if (is_null($this->_mpd->Stop())) { return false; }
return true;
@@ -349,7 +349,7 @@ class AmpacheMpd extends localplay_controller {
* skip
* This tells MPD to skip to the specified song
*/
- function skip($song) {
+ public function skip($song) {
if (is_null($this->_mpd->SkipTo($song))) { return false; }
return true;
@@ -359,7 +359,7 @@ class AmpacheMpd extends localplay_controller {
/**
* This tells MPD to increase the volume by 5
*/
- function volume_up() {
+ public function volume_up() {
if (is_null($this->_mpd->AdjustVolume('5'))) { return false; }
return true;
@@ -369,7 +369,7 @@ class AmpacheMpd extends localplay_controller {
/**
* This tells MPD to decrese the volume by 5
*/
- function volume_down() {
+ public function volume_down() {
if (is_null($this->_mpd->AdjustVolume('-5'))) { return false; }
return true;
@@ -380,7 +380,7 @@ class AmpacheMpd extends localplay_controller {
* next
* This just tells MPD to skip to the next song
*/
- function next() {
+ public function next() {
if (is_null($this->_mpd->Next())) { return false; }
return true;
@@ -391,7 +391,7 @@ class AmpacheMpd extends localplay_controller {
* prev
* This just tells MPD to skip to the prev song
*/
- function prev() {
+ public function prev() {
if (is_null($this->_mpd->Previous())) { return false; }
return true;
@@ -402,7 +402,7 @@ class AmpacheMpd extends localplay_controller {
* pause
* This tells MPD to pause the current song
*/
- function pause() {
+ public function pause() {
if (is_null($this->_mpd->Pause())) { return false; }
return true;
@@ -414,7 +414,7 @@ class AmpacheMpd extends localplay_controller {
* volume
* This tells MPD to set the volume to the parameter
*/
- function volume($volume) {
+ public function volume($volume) {
if (is_null($this->_mpd->SetVolume($volume))) { return false; }
return true;
@@ -425,19 +425,18 @@ class AmpacheMpd extends localplay_controller {
* repeat
* This tells MPD to set the repeating the playlist (i.e. loop) to either on or off
*/
- function repeat($state) {
+ public function repeat($state) {
if (is_null($this->_mpd->SetRepeat($state))) { return false; }
return true;
} // repeat
-
/**
* random
* This tells MPD to turn on or off the playing of songs from the playlist in random order
*/
- function random($onoff) {
+ public function random($onoff) {
if (is_null($this->_mpd->SetRandom($onoff))) { return false; }
return true;
@@ -448,7 +447,7 @@ class AmpacheMpd extends localplay_controller {
* move
* This tells MPD to move song from SrcPos to DestPos
*/
- function move($SrcPos, $DestPos) {
+ public function move($SrcPos, $DestPos) {
if (is_null($this->_mpd->PLMoveTrack($SrcPos, $DestPos))) { return false; }