@@ -20,42 +20,42 @@ App = (function(){
2020 class App {
2121 constructor ( ) {
2222 this . settings = require ( './app-settings' ) (
23- `${ App . paths . home } /preferences.json` ,
24- {
25- CloseToTray : true ,
26- CloseToController : false ,
27- ShowApplicationMenu : true ,
28- ShowTray : true ,
29- TrayIcon : 'lime' ,
30- Notifications : {
31- ShowTrackChange : true ,
32- ShowPlaybackPlaying : true ,
33- ShowPlaybackPaused : true ,
34- ShowPlaybackStopped : true ,
35- OnlyWhenFocused : true
36- } ,
37- NavBar : {
38- Follow : true ,
39- User : true ,
40- Radio : true ,
41- YourMusic : true ,
42- Browse : true ,
43- Settings : true ,
44- Search : true ,
45- Sing : true
46- } ,
47- AlbumCacheDisabled : false ,
48- Theme : 'dark' ,
49- StartOnLogin : false ,
50- StartHidden : false ,
51- lastURL : null
52- }
53- ) ;
54- this . settings . open ( ( err , data ) => {
55- if ( err ) {
23+ `${ App . paths . home } /preferences.json` ,
24+ {
25+ CloseToTray : true ,
26+ CloseToController : false ,
27+ ShowApplicationMenu : true ,
28+ ShowTray : true ,
29+ TrayIcon : 'lime' ,
30+ Notifications : {
31+ ShowTrackChange : true ,
32+ ShowPlaybackPlaying : true ,
33+ ShowPlaybackPaused : true ,
34+ ShowPlaybackStopped : true ,
35+ OnlyWhenFocused : true
36+ } ,
37+ NavBar : {
38+ Follow : true ,
39+ User : true ,
40+ Radio : true ,
41+ YourMusic : true ,
42+ Browse : true ,
43+ Settings : true ,
44+ Search : true ,
45+ Sing : true
46+ } ,
47+ AlbumCacheDisabled : false ,
48+ Theme : 'dark' ,
49+ StartOnLogin : false ,
50+ StartHidden : false ,
51+ lastURL : null
52+ }
53+ ) ;
54+ this . settings . open ( ( err , data ) => {
55+ if ( err ) {
5656 console . log ( "The settings are corrupt, cannot continue." ) ;
5757 process . exit ( - 1 ) ;
58- }
58+ }
5959 } ) ;
6060 this . dbus = require ( './dbus' ) ( App . names . process ) ;
6161 require ( './plugins' ) ( app ) ;
@@ -75,27 +75,27 @@ App = (function(){
7575 _spotify = new Spotify ( ) ;
7676 } ) ;
7777 app . on ( 'quit' , ( ) => {
78- console . log ( 'Exiting...' ) ;
78+ console . log ( 'Exiting...' ) ;
7979 } ) ;
8080 //Make sure we only run one instance of the application
8181 var shouldQuit = app . makeSingleInstance ( function ( commandLine , workingDirectory ) {
82- // Someone tried to run a second instance, we should focus our window.
83- if ( _spotify ) {
84- if ( _spotify . isMinimized ( ) ) _spotify . restore ( ) ;
85- _spotify . show ( ) ;
86- _spotify . focus ( ) ;
87- }
82+ // Someone tried to run a second instance, we should focus our window.
83+ if ( _spotify ) {
84+ if ( _spotify . isMinimized ( ) ) _spotify . restore ( ) ;
85+ _spotify . show ( ) ;
86+ _spotify . focus ( ) ;
87+ }
8888 } ) ;
8989 //Quit if we're trying to run another instance
9090 if ( shouldQuit ) {
91- console . log ( 'An instance is already running, exiting...' ) ;
92- app . quit ( ) ;
93- return ;
91+ console . log ( 'An instance is already running, exiting...' ) ;
92+ app . quit ( ) ;
93+ return ;
9494 }
9595 //Let's support OS X anyways.
9696 app . on ( 'activate' , function ( ) {
97- _spotify . show ( ) ;
98- _spotify . unmaximize ( ) ;
97+ _spotify . show ( ) ;
98+ _spotify . unmaximize ( ) ;
9999 } ) ;
100100 }
101101 get VERSION ( ) {
@@ -205,12 +205,12 @@ App = (function(){
205205 }
206206 clearCache ( ) {
207207 _spotify . loadURL ( "about:blank" ) ;
208- _spotify . webContents . session . clearCache ( ( ) => {
209- _spotify . webContents . session . clearStorageData ( ( ) => {
210- console . log ( "Cleared session and cache." ) ;
211- _spotify . loadURL ( this . HOST ) ;
212- } ) ;
213- } ) ;
208+ _spotify . webContents . session . clearCache ( ( ) => {
209+ _spotify . webContents . session . clearStorageData ( ( ) => {
210+ console . log ( "Cleared session and cache." ) ;
211+ _spotify . loadURL ( this . HOST ) ;
212+ } ) ;
213+ } ) ;
214214 }
215215 }
216216 return App ;
0 commit comments