summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Arthur <flowerysong00@yahoo.com>2013-01-14 23:51:02 -0500
committerPaul Arthur <flowerysong00@yahoo.com>2013-01-15 11:30:47 -0500
commite2484ee9a0e7f7de16fe2b3d015af59f0c9111c0 (patch)
tree3cdddc12565a0329696dddee52e484afdda3c0d5
parent355b30b299d55901ab703e1738263df134fcaf99 (diff)
downloadampache-e2484ee9a0e7f7de16fe2b3d015af59f0c9111c0.tar.gz
ampache-e2484ee9a0e7f7de16fe2b3d015af59f0c9111c0.tar.bz2
ampache-e2484ee9a0e7f7de16fe2b3d015af59f0c9111c0.zip
Clean up the VLC localplay controller
-rw-r--r--modules/localplay/vlc.controller.php29
1 files changed, 8 insertions, 21 deletions
diff --git a/modules/localplay/vlc.controller.php b/modules/localplay/vlc.controller.php
index 1bbd155b..f58836ac 100644
--- a/modules/localplay/vlc.controller.php
+++ b/modules/localplay/vlc.controller.php
@@ -285,27 +285,14 @@ class AmpacheVlc extends localplay_controller {
} // get_active_instance
- /**
- * add
- * This must take an array of URL's from Ampache
- * and then add them to Vlc webinterface
- */
- public function add($object) {
-
- $url = $this->get_url($object);
-
- // Try to pass a title (if we can)
- if (is_object($object)) {
- $title = $object->title;
- }
-
- if (is_null($this->_vlc->add($title,$url))) {
- debug_event('vlc_add',"Error: Unable to add $url to Vlc",'1');
- }
-
- return true;
-
- } // add
+ public function add_url(Stream_URL $url) {
+ if (is_null($this->_vlc->add($url->title, $url->url))) {
+ debug_event('vlc', 'add_url failed to add: ' . json_encode($url), 1);
+ return false;
+ }
+
+ return true;
+ }
/**
* delete_track