Compare commits

..

6 Commits

Author SHA1 Message Date
Feross Aboukhadijeh
9d3e26f15a 0.7.2 2016-06-02 22:46:10 -07:00
Feross Aboukhadijeh
8a95895254 Ensure state.saved.prefs exists
Fixes a bug I introduced in the migrations
2016-06-02 22:33:22 -07:00
Feross Aboukhadijeh
5d71f9e9c6 code cleanup 2016-06-02 22:32:01 -07:00
Feross Aboukhadijeh
5d410457ce Merge pull request #622 from feross/about
Fix title in About Window
2016-06-02 21:12:58 -07:00
Feross Aboukhadijeh
c6cd21b8ff Fix title in About Window
Shows up as 'Electron' on Windows
2016-06-02 20:50:04 -07:00
Feross Aboukhadijeh
2235b2fa82 changelog 2016-06-02 20:10:40 -07:00
6 changed files with 32 additions and 11 deletions

View File

@@ -1,5 +1,16 @@
# WebTorrent Desktop Version History
## v0.7.1 - 2016-06-02
### Changed
- Change "Step Forward" keyboard shortcut to `Alt+Left`
- Change "Step Backward" keyboard shortcut to to `Alt+Right`
### Fixed
- First time startup bug -- invalid torrent/poster paths
## v0.7.0 - 2016-06-02
### Added

View File

@@ -92,6 +92,10 @@ function getDefaultDownloadPath () {
return ''
}
if (isPortable()) {
return path.join(getConfigPath(), 'Downloads')
}
var electron = require('electron')
return process.type === 'renderer'

View File

@@ -22,6 +22,7 @@ function init () {
resizable: false,
show: false,
skipTaskbar: true,
title: 'About ' + config.APP_WINDOW_TITLE,
useContentSize: true,
width: 300
})

View File

@@ -1,7 +1,7 @@
{
"name": "webtorrent-desktop",
"description": "WebTorrent, the streaming torrent client. For OS X, Windows, and Linux.",
"version": "0.7.1",
"version": "0.7.2",
"author": {
"name": "WebTorrent, LLC",
"email": "feross@feross.org",

View File

@@ -18,25 +18,24 @@ function run (state) {
var version = state.saved.version
if (semver.lt(version, '0.7.0')) {
migrate_0_7_0(state)
migrate_0_7_0(state.saved)
}
// Future migrations...
// if (semver.lt(version, '0.8.0')) {
// migrate_0_8_0(state)
// }
if (semver.lt(version, '0.7.2')) {
migrate_0_7_2(state.saved)
}
// Config is now on the new version
state.saved.version = config.APP_VERSION
}
function migrate_0_7_0 (state) {
function migrate_0_7_0 (saved) {
console.log('migrate to 0.7.0')
var fs = require('fs-extra')
var path = require('path')
state.saved.torrents.forEach(function (ts) {
saved.torrents.forEach(function (ts) {
var infoHash = ts.infoHash
// Replace torrentPath with torrentFileName
@@ -86,3 +85,11 @@ function migrate_0_7_0 (state) {
delete ts.fileModtimes
})
}
function migrate_0_7_2 (saved) {
if (!saved.prefs) {
saved.prefs = {
downloadPath: config.DEFAULT_DOWNLOAD_PATH
}
}
}

View File

@@ -100,9 +100,7 @@ function setupSavedState (cb) {
var saved = {
prefs: {
downloadPath: config.IS_PORTABLE
? path.join(config.CONFIG_PATH, 'Downloads')
: config.DEFAULT_DOWNLOAD_PATH
downloadPath: config.DEFAULT_DOWNLOAD_PATH
},
torrents: config.DEFAULT_TORRENTS.map(createTorrentObject),
version: config.APP_VERSION /* make sure we can upgrade gracefully later */