Ejemplo n.º 1
0
 * version 3 of the License, or any later version.
 *
 * 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\Core\API;
$api = new API('music');
$api->addNavigationEntry(array('id' => $api->getAppName(), 'order' => 10, 'href' => $api->linkToRoute('music_index'), 'icon' => $api->imagePath('music.svg', 'music'), 'name' => $api->getTrans()->t('Music')));
$api->connectHook(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_write, 'OCA\\Music\\Utility\\HookHandler', 'fileUpdated');
$api->connectHook(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_delete, 'OCA\\Music\\Utility\\HookHandler', 'fileDeleted');
$api->connectHook('OCP\\Share', 'post_unshare', 'OCA\\Music\\Utility\\HookHandler', 'itemUnshared');
$api->connectHook('OCP\\Share', 'post_shared', 'OCA\\Music\\Utility\\HookHandler', 'itemShared');
$api->addRegularTask('OCA\\Music\\Backgroundjob\\CleanUp', 'run');
// load fileactions
$api->addScript('public/fileactions');
if (version_compare(join('.', $api->getVersion()), '6.0.3', '<')) {
    $api->addScript('public/stable5-fixes');
}
// load file for public sharing page
$api->addScript('public/musicFilePlayer');
// register search provider
\OC_Search::registerProvider('OCA\\Music\\Utility\\Search');
// register settings