External player clean up (#914)
* minor `addSubtitles` clean up * external player clean up
This commit is contained in:
@@ -68,7 +68,8 @@ function getDefaultState () {
|
||||
* Getters, for convenience
|
||||
*/
|
||||
getPlayingTorrentSummary,
|
||||
getPlayingFileSummary
|
||||
getPlayingFileSummary,
|
||||
getExternalPlayerName
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +169,12 @@ function getPlayingFileSummary () {
|
||||
return torrentSummary.files[this.playing.fileIndex]
|
||||
}
|
||||
|
||||
function getExternalPlayerName () {
|
||||
const playerPath = this.saved.prefs.externalPlayerPath
|
||||
if (!playerPath) return 'VLC'
|
||||
return path.basename(playerPath).split('.')[0]
|
||||
}
|
||||
|
||||
function load (cb) {
|
||||
const state = getDefaultState()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user