Skip to content

Commit

Permalink
Set default externalPlayerPath (#1702)
Browse files Browse the repository at this point in the history
Set default externalPlayerPath
  • Loading branch information
feross committed Sep 19, 2019
2 parents 88e7167 + f5ab39b commit b9bcf74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/renderer/lib/migrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function run (state) {
if (semver.lt(version, '0.17.0')) migrate_0_17_0(saved)
if (semver.lt(version, '0.17.2')) migrate_0_17_2(saved)
if (semver.lt(version, '0.21.0')) migrate_0_21_0(saved)
if (semver.lt(version, '0.21.1')) migrate_0_21_1(saved)

// Config is now on the new version
state.saved.version = config.APP_VERSION
Expand Down Expand Up @@ -214,3 +215,9 @@ function migrate_0_21_0 (saved) {
saved.prefs.soundNotifications = true
}
}

function migrate_0_21_1 (saved) {
if (saved.prefs.externalPlayerPath == null) {
saved.prefs.externalPlayerPath = ''
}
}
2 changes: 1 addition & 1 deletion src/renderer/lib/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function setupStateSaved () {
downloadPath: config.DEFAULT_DOWNLOAD_PATH,
isFileHandler: false,
openExternalPlayer: false,
externalPlayerPath: null,
externalPlayerPath: '',
startup: false,
soundNotifications: true,
autoAddTorrents: false,
Expand Down

0 comments on commit b9bcf74

Please sign in to comment.