Save video position
This commit is contained in:
@@ -9,8 +9,7 @@ var LocationHistory = require('./lib/location-history')
|
||||
module.exports = {
|
||||
getInitialState,
|
||||
getDefaultPlayState,
|
||||
getDefaultSavedState,
|
||||
getPlayingTorrentSummary
|
||||
getDefaultSavedState
|
||||
}
|
||||
|
||||
function getInitialState () {
|
||||
@@ -63,7 +62,8 @@ function getInitialState () {
|
||||
/*
|
||||
* Getters, for convenience
|
||||
*/
|
||||
getPlayingTorrentSummary
|
||||
getPlayingTorrentSummary,
|
||||
getPlayingFileSummary
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,3 +276,9 @@ function getPlayingTorrentSummary () {
|
||||
var infoHash = this.playing.infoHash
|
||||
return this.saved.torrents.find((x) => x.infoHash === infoHash)
|
||||
}
|
||||
|
||||
function getPlayingFileSummary () {
|
||||
var torrentSummary = this.getPlayingTorrentSummary()
|
||||
if (!torrentSummary) return null
|
||||
return torrentSummary.files[this.playing.fileIndex]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user