Media: Change includes in app.php to use the autoloader

This commit is contained in:
Bart Visscher 2012-06-25 20:54:15 +02:00
parent c6b9f613bb
commit 103ae6faa4
2 changed files with 16 additions and 15 deletions

View File

@ -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');

View File

@ -21,18 +21,6 @@
*
*/
//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');
class OC_MEDIA{
/**
* get the sha256 hash of the password needed for ampache