From 79ca59df627660d635a9373bfeb293592c173793 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Fri, 28 Sep 2007 04:34:02 +0000 Subject: fixed some localplay issues, now correctly shows the active instance at least for the MPD module --- lib/class/localplay.class.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'lib/class/localplay.class.php') diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index c5b16fd3..dc367b28 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -543,6 +543,18 @@ class Localplay { } // get_instances + /** + * current_instance + * This returns the UID of the current Instance + */ + public function current_instance() { + + $data = $this->_player->get_instance(); + + return $data['id']; + + } // current_instance + /** * add_instance * This adds a new instance for the current controller type @@ -553,6 +565,16 @@ class Localplay { } // add_instance + /** + * set_active_instance + * This sets the active instance of the localplay controller + */ + public function set_active_instance($instance) { + + $this->_player->set_active_instance($instance); + + } // set_active_instance + /** * delete * This removes songs from the players playlist as defined get function -- cgit