Beispiel #1
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
namespace OCA\Music;

use OCA\Music\AppFramework\App;
use OCA\Music\DependencyInjection\DIContainer;
/**
 * Ampache API http://ampache.org/wiki/dev:xmlapi
 */
/** @var $this \OC_Router */
$this->create('music_ampache', '/ampache')->get()->action(function ($params) {
    App::main('AmpacheController', 'ampache', $params, new DIContainer());
});
$this->create('music_ampache_alternative', '/ampache/server/xml.server.php')->get()->action(function ($params) {
    App::main('AmpacheController', 'ampache', $params, new DIContainer());
});
/**
 * Ampache API http://ampache.org/wiki/dev:xmlapi - POST version. Dirty fix for JustPlayer
 */
$this->create('music_ampache_post', '/ampache')->post()->action(function ($params) {
    App::main('AmpacheController', 'ampache', $params, new DIContainer());
});
$this->create('music_ampache_alternative_post', '/ampache/server/xml.server.php')->post()->action(function ($params) {
    App::main('AmpacheController', 'ampache', $params, new DIContainer());
});
Beispiel #2
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
namespace OCA\Music;

use OCA\Music\AppFramework\App;
use OCA\Music\DependencyInjection\DIContainer;
/**
 * Webinterface
 */
/** @var $this \OC_Router */
$this->create('music_index', '/')->get()->action(function ($params) {
    App::main('PageController', 'index', $params, new DIContainer());
});
/**
 * Log
 */
$this->create('music_log', '/api/log')->post()->action(function ($params) {
    App::main('LogController', 'log', $params, new DIContainer());
});
// include external API
require_once __DIR__ . '/routes_api.php';
// include settings routes
require_once __DIR__ . '/routes_settings.php';
// include ampache routes
require_once __DIR__ . '/routes_ampache.php';
Beispiel #3
0
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
namespace OCA\Music;

use OCA\Music\AppFramework\App;
use OCA\Music\DependencyInjection\DIContainer;
/**
 * Path of the music collection
 */
$this->create('music_settings_user_path', '/settings/user/path')->post()->action(function ($params) {
    App::main('SettingController', 'userPath', $params, new DIContainer());
});
/**
 * Add API key
 */
$this->create('music_settings_user_add', '/settings/userkey/add')->post()->action(function ($params) {
    App::main('SettingController', 'addUserKey', $params, new DIContainer());
});
/**
 * Remove API key
 */
$this->create('music_settings_user_remove', '/settings/userkey/remove')->post()->action(function ($params) {
    App::main('SettingController', 'removeUserKey', $params, new DIContainer());
});
Beispiel #4
0
    App::main('ApiController', 'album', $params, new DIContainer());
});
$this->create('music_album_cover', '/api/album/{albumIdOrSlug}/cover')->get()->action(function ($params) {
    App::main('ApiController', 'cover', $params, new DIContainer());
});
/**
 * Track(s)
 */
$this->create('music_tracks', '/api/tracks')->get()->action(function ($params) {
    App::main('ApiController', 'tracks', $params, new DIContainer());
});
$this->create('music_track', '/api/track/{trackIdOrSlug}')->get()->action(function ($params) {
    App::main('ApiController', 'track', $params, new DIContainer());
});
$this->create('music_file', '/api/file/{fileId}')->get()->action(function ($params) {
    App::main('ApiController', 'trackByFileId', $params, new DIContainer());
});
$this->create('music_file_download', '/api/file/{fileId}/download')->get()->action(function ($params) {
    App::main('ApiController', 'download', $params, new DIContainer());
});
/*$this->create('music_track_shows', '/api/track/{id}/shows')->get()->action(
	function($params){
		App::main('ApiController', 'track-lyrics', $params, new DIContainer());
	}
);*/
/**
 * Scan
 */
$this->create('music_scan', '/api/scan')->get()->action(function ($params) {
    App::main('ApiController', 'scan', $params, new DIContainer());
});