@@ -26,14 +26,14 @@ function OfflineController (manifestController) {
2626OfflineController . prototype . getManifestsList = function ( callback ) {
2727 dirList ( appSettings . getSettings ( ) . settingsFolder , true , false )
2828 . then ( function ( settingsFolderList ) {
29- let manifestList = [ ] ;
30- for ( let i = 0 , j = settingsFolderList . length ; i < j ; i ++ ) {
31- manifestList . push ( settingsFolderList [ i ] ) ;
32- }
33- callback ( null , manifestList ) ;
34- } , function ( err ) {
35- callback ( err )
36- } ) ;
29+ let manifestList = [ ] ;
30+ for ( let i = 0 , j = settingsFolderList . length ; i < j ; i ++ ) {
31+ manifestList . push ( settingsFolderList [ i ] ) ;
32+ }
33+ callback ( null , manifestList ) ;
34+ } , function ( err ) {
35+ callback ( err ) ;
36+ } ) ;
3737} ;
3838
3939/**
@@ -60,8 +60,8 @@ OfflineController.prototype.getManifestsListWithInfo = function (callback, full)
6060 }
6161 }
6262 callback ( null , newResults ) ;
63- } , function ( err ) {
64- callback ( err ) ;
63+ } , function ( promisesError ) {
64+ callback ( promisesError ) ;
6565 } ) ;
6666 }
6767 } ) ;
@@ -218,7 +218,7 @@ OfflineController.prototype.getManifestDataFile = function (manifestId, callback
218218 */
219219OfflineController . prototype . remove = function ( manifestId , onSuccess , onFailure ) {
220220 const settingsFolder = appSettings . getSettings ( ) . settingsFolder + manifestId ;
221- this . getManifestDataFile ( manifestId , function ( info ) {
221+ this . getManifestDataFile ( manifestId , function ( info ) {
222222 if ( ! info ) {
223223 // no manifest data found for manifest, the download has not been started => just remove settings
224224 rmdir ( settingsFolder , function ( err ) {
@@ -232,7 +232,7 @@ OfflineController.prototype.remove = function (manifestId, onSuccess, onFailure)
232232 let folder = info . folder ;
233233 if ( ! folder ) {
234234 // use default download folder path
235- folder = path . resolve ( appSettings . getSettings ( ) . downloadsFolderPath ) ;
235+ folder = path . resolve ( appSettings . getSettings ( ) . downloadsFolderPath ) ;
236236 }
237237 const downloadsFolder = folder + '/' + manifestId ;
238238 rmdir ( downloadsFolder , function ( err ) {
@@ -311,7 +311,7 @@ OfflineController.prototype.restoreLocalManifest = function (manifestId, onSucce
311311 representations . audio = info . manifest . audio ;
312312 representations . text = info . manifest . text ;
313313 self . _manifestController . saveManifestWithChosenRepresentations ( manifestId , representations )
314- . then ( onSuccess , onFailure ) ;
314+ . then ( onSuccess , onFailure ) ;
315315 } ) ;
316316} ;
317317
0 commit comments