diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-02-11 20:19:10 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-03-28 16:56:21 -0400 |
commit | 4b4e7decf647ec235d8c7dff0757e2e4924f0fb5 (patch) | |
tree | acf7e0dcaf03d73f21b33b00f524fc9c505ac5d5 /lib/class/catalog.class.php | |
parent | 744e6bb99404b8455024488472a1ad02e5c87025 (diff) | |
download | ampache-4b4e7decf647ec235d8c7dff0757e2e4924f0fb5.tar.gz ampache-4b4e7decf647ec235d8c7dff0757e2e4924f0fb5.tar.bz2 ampache-4b4e7decf647ec235d8c7dff0757e2e4924f0fb5.zip |
Try to fix remote streaming
Diffstat (limited to 'lib/class/catalog.class.php')
-rw-r--r-- | lib/class/catalog.class.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 929103be..88d63674 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -1038,11 +1038,11 @@ class Catalog extends database_object { } // add_to_catalog /** - * _connect_remote + * connect * * Connects to the remote catalog that we are. */ - private function _connect_remote() { + public function connect() { try { $remote_handle = new AmpacheApi(array( 'username' => $this->remote_username, @@ -1074,7 +1074,7 @@ class Catalog extends database_object { * database. */ public function update_remote_catalog($type = 0) { - $remote_handle = $this->_connect_remote(); + $remote_handle = $this->connect(); if (!$remote_handle) { return false; } @@ -1110,7 +1110,7 @@ class Catalog extends database_object { } else { $data['song']['catalog'] = $this->id; - $data['song']['file'] = preg_replace('/ssid=.*&/', '', $data['song']['url']); + $data['song']['file'] = preg_replace('/ssid=.*?&/', '', $data['song']['url']); if (!Song::insert($data['song'])) { debug_event('remote_catalog', 'Insert failed for ' . $data['song']['self']['id'], 1); Error::add('general', T_('Unable to Insert Song - %s'), $data['song']['title']); @@ -1138,7 +1138,7 @@ class Catalog extends database_object { */ public function clean_remote_catalog() { //FIXME: Implement - $remote_handle = $this->_connect_remote(); + $remote_handle = $this->connect(); if (!$remote_handle) { return false; } |