diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-08-01 01:20:00 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-08-01 01:20:00 +0200 |
commit | 1933426e3eef35ff55b2c5ed494012cbfe637e10 (patch) | |
tree | 67142b8a3f29d72b3f3cfed18bc6aba3b0843c70 /apps | |
parent | e1596cc65a93d86f81aac025a53144c8513be217 (diff) | |
download | nextcloud-server-1933426e3eef35ff55b2c5ed494012cbfe637e10.tar.gz nextcloud-server-1933426e3eef35ff55b2c5ed494012cbfe637e10.zip |
make the persitent playlist work anywhere
Diffstat (limited to 'apps')
-rw-r--r-- | apps/media/appinfo/app.php | 4 | ||||
-rw-r--r-- | apps/media/js/loader.js (renamed from apps/media/js/files.js) | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/apps/media/appinfo/app.php b/apps/media/appinfo/app.php index b29b842d23a..20c58689f09 100644 --- a/apps/media/appinfo/app.php +++ b/apps/media/appinfo/app.php @@ -22,9 +22,7 @@ require_once('apps/media/lib_media.php'); -if(OC_App::getCurrentApp()=='files'){ - OC_Util::addScript('media','files'); -} +OC_Util::addScript('media','loader'); OC_App::register( array( 'order' => 3, 'id' => 'media', 'name' => 'Media' )); diff --git a/apps/media/js/files.js b/apps/media/js/loader.js index 79741e19703..b2a306b9b37 100644 --- a/apps/media/js/files.js +++ b/apps/media/js/loader.js @@ -43,10 +43,12 @@ $(document).ready(function() { // FileActions.register('audio','Add to playlist','',addAudio); // FileActions.register('application/ogg','Add to playlist','',addAudio); - FileActions.register('audio','Play','',playAudio); - FileActions.register('application/ogg','','Play',playAudio); - FileActions.setDefault('audio','Play'); - FileActions.setDefault('application/ogg','Play'); + if(typeof FileActions!=='undefined'){ + FileActions.register('audio','Play','',playAudio); + FileActions.register('application/ogg','','Play',playAudio); + FileActions.setDefault('audio','Play'); + FileActions.setDefault('application/ogg','Play'); + } if(typeof localStorage !== 'undefined'){ if(localStorage.hasOwnProperty('oc_playlist_items')){ loadPlayer(); |