|
|
|
|
@ -22,9 +22,22 @@ |
|
|
|
|
|
|
|
|
|
$l=OC_L10N::get('media'); |
|
|
|
|
|
|
|
|
|
require_once('media/lib_media.php'); |
|
|
|
|
require_once('media/lib_collection.php'); |
|
|
|
|
require_once('media/lib_scanner.php'); |
|
|
|
|
OC::$CLASSPATH['OC_MEDIA'] = 'media/lib_media.php'; |
|
|
|
|
OC::$CLASSPATH['OC_MediaSearchProvider'] = 'media/lib_media.php'; |
|
|
|
|
OC::$CLASSPATH['OC_MEDIA_COLLECTION'] = 'media/lib_collection.php'; |
|
|
|
|
OC::$CLASSPATH['OC_MEDIA_SCANNER'] = 'media/lib_scanner.php'; |
|
|
|
|
|
|
|
|
|
//we need to have the sha256 hash of passwords for ampache |
|
|
|
|
OCP\Util::connectHook('OC_User','post_login','OC_MEDIA','loginListener'); |
|
|
|
|
|
|
|
|
|
//connect to the filesystem for auto updating |
|
|
|
|
OCP\Util::connectHook('OC_Filesystem','post_write','OC_MEDIA','updateFile'); |
|
|
|
|
|
|
|
|
|
//listen for file deletions to clean the database if a song is deleted |
|
|
|
|
OCP\Util::connectHook('OC_Filesystem','post_delete','OC_MEDIA','deleteFile'); |
|
|
|
|
|
|
|
|
|
//list for file moves to update the database |
|
|
|
|
OCP\Util::connectHook('OC_Filesystem','post_rename','OC_MEDIA','moveFile'); |
|
|
|
|
|
|
|
|
|
OCP\Util::addscript('media','loader'); |
|
|
|
|
OCP\App::registerPersonal('media','settings'); |
|
|
|
|
|