Torrent list: fix button alignment

This commit is contained in:
DC
2016-03-17 01:49:31 -07:00
parent 849bbed0ae
commit 3e0528090e

View File

@@ -40,8 +40,8 @@ function init (callback) {
function addChromecastEvents () { function addChromecastEvents () {
state.devices.chromecast.on('error', function (err) { state.devices.chromecast.on('error', function (err) {
err.message = 'Chromecast: ' + err.message state.devices.chromecast.errorMessage = err.message
onError(err) update()
}) })
state.devices.chromecast.on('disconnect', function () { state.devices.chromecast.on('disconnect', function () {
state.playing.location = 'local' state.playing.location = 'local'
@@ -60,10 +60,7 @@ function pollCastStatus(state) {
else return else return
device.status(function (err, status) { device.status(function (err, status) {
if (err) { if (err) return console.log('Error getting %s status: %o', state.playing.location, err)
return console.log('Error retrieving %s status: %o', state.playing.location, err)
}
console.log('GOT CAST STATUS: %o', status)
handleStatus(status) handleStatus(status)
}) })
} }
@@ -79,7 +76,7 @@ function openChromecast () {
} }
state.playing.location = 'chromecast-pending' state.playing.location = 'chromecast-pending'
var torrentSummary = getTorrentSummary(state.playing.infoHash) var torrentSummary = state.saved.torrents.find((x) => x.infoHash === state.playing.infoHash)
state.devices.chromecast.play(state.server.networkURL, { state.devices.chromecast.play(state.server.networkURL, {
type: 'video/mp4', type: 'video/mp4',
title: config.APP_NAME + ' — ' + torrentSummary.name title: config.APP_NAME + ' — ' + torrentSummary.name
@@ -146,6 +143,6 @@ function getActiveDevice () {
else throw new Error('getActiveDevice() called, but we\'re not casting') else throw new Error('getActiveDevice() called, but we\'re not casting')
} }
function castCallback (err) { function castCallback () {
console.log('CAST CALLBACK: %o', arguments) console.log('Cast callback: %o', arguments)
} }