Removed nowplaying.vue

This commit is contained in:
samcm 2018-01-01 17:06:10 +11:00
parent c892040c10
commit ffecf45dbe
6 changed files with 12 additions and 184 deletions

View File

@ -132,6 +132,13 @@ export default {
// Browser is not Chrome
}
if (this.$store.getters.getAutoJoin) {
// Attempt to auto join
this.$store.dispatch('socketConnect', {
address: this.$store.getters.getAutoJoinUrl,
callback: function () {}
})
}
if (this.$route.query.ptserver && this.$route.query.ptroom) {
// Looks like a valid request...

View File

@ -89,7 +89,6 @@ export default {
return this.logos.light.small
},
isPlayer: function () {
console.log('Router path is ' + this.$route.path)
if (this.$route.path == '/') {
return true
}
@ -111,8 +110,6 @@ export default {
return (this.ptConnected && this.ptServer && this.ptRoom && this.shortUrl)
},
shortUrl: function () {
console.log('Short url calc done below')
console.log(this.$store.getters.getShortLink)
return this.$store.getters.getShortLink
},
firstRun: function () {
@ -127,14 +124,9 @@ export default {
return this.$refs.statisticsModal.open()
},
generateShortLink: function () {
console.log('Generating a shortened link')
return this.sendShortLinkRequest(false)
},
sendShortLinkRequest: function (overrideHost) {
},
refreshPlexDevices: function () {
let oldClient = this.$store.getters.getChosenClient
if (this.$store.getters.getSocket) {
this.$store.getters.getSocket.disconnect()
}

View File

@ -43,13 +43,7 @@ export default {
plexcontent
},
mounted: function () {
if (this.$store.getters.getAutoJoin) {
// Attempt to auto join
this.$store.dispatch('socketConnect', {
address: this.$store.getters.getAutoJoinUrl,
callback: function () {}
})
}
},
created: function () {
},

View File

@ -109,7 +109,7 @@
export default {
props: ['object'],
name: 'joinroom',
data () {
data () {
return {
selectedServer: '',
serverError: null,

View File

@ -1,161 +0,0 @@
<template>
<div style="position:relative">
<v-layout flex wrap row style="margin-top:15%">
<v-flex xs12 md10 offset-md1>
<v-card horizontal :img="metadataArt">
<v-layout flex wrap row style="background: rgba(0,0,0,0.5); " class="pl-0 pr-0">
<v-flex md4 xl2 class="pa-0 ma-0 hidden-xs-only" style="position:relative">
<img :src="metadataThumb" class="pa-4" style="width:auto;height:auto; max-width:100%;max-height:100%;position: absolute; margin:auto; left:0; right:0; bottom:0; top:0"></img>
</v-flex>
<v-flex md8 xl10 class="pa-4">
<v-subheader light> Now Playing </v-subheader>
<h3> {{ metadataTitle }} </h3>
<h6> {{ metadataInfo }} </h6>
<label>Playing on {{ chosenClient.name }} from {{ metadataServer }}</label>
<v-divider></v-divider>
<p class="pt-3" style="font-style: italic"> {{ metadata.summary }} </p>
</v-flex>
</v-layout>
</v-card>
</v-flex>
</v-layout>
</div>
</template>
<script>
export default {
props: ['object'],
name: 'nowplaying',
data () {
return {}
},
components: {},
computed: {
chosenClient: function () {
return this.$store.getters.getChosenClient
},
plex: function () {
return this.$store.getters.getPlex
},
validPlex: function () {
if (!this.$store.state.plex) {
return false
}
return true
},
context: function () {
return this.$store
},
backgroundImgObj: function () {
return {
'background-image': this.metadataArt
}
},
metadataThumb: function () {
if (!this.validPlex) {
return ''
}
let plexObj = this.$store.state.plex
if (!this.$store.getters.getChosenClient) {
return ''
}
let metadata = this.$store.getters.getChosenClient.clientPlayingMetadata
if (!metadata) {
return ''
}
let server
let content = metadata.thumb
if (metadata.parentThumb) {
content = metadata.parentThumb
}
if (!plexObj.servers[metadata.machineIdentifier]) {
return ''
}
return plexObj.servers[metadata.machineIdentifier].getUrlForLibraryLoc(content, 700, 700)
},
metadataArt: function () {
if (!this.validPlex) {
return ''
}
let plexObj = this.$store.state.plex
if (!this.$store.getters.getChosenClient) {
return ''
}
let metadata = this.$store.getters.getChosenClient.clientPlayingMetadata
if (!metadata) {
return ''
}
let server
let content = metadata.art
if (!plexObj.servers[metadata.machineIdentifier]) {
return ''
}
return plexObj.servers[metadata.machineIdentifier].getUrlForLibraryLoc(content, 700, 700, 8)
},
metadataServer: function () {
if (!this.validPlex) {
return ''
}
if (!this.$store.getters.getChosenClient) {
return ''
}
let metadata = this.$store.getters.getChosenClient.clientPlayingMetadata
if (!metadata) {
return ''
}
return (this.plex.server[this.chosenClient.clientPlayingMetadata.machineIdentifier].name)
},
metadataTitle: function () {
if (!this.validPlex) {
return ''
}
if (!this.$store.getters.getChosenClient) {
return ''
}
let metadata = this.$store.getters.getChosenClient.clientPlayingMetadata
if (!metadata) {
return ''
}
if (metadata.type == 'movie') {
return metadata.title
}
if (metadata.type == 'episode') {
return metadata.grandparentTitle
}
return metadata.index
},
metadataInfo: function () {
if (!this.validPlex) {
return ''
}
if (!this.$store.getters.getChosenClient) {
return ''
}
let metadata = this.$store.getters.getChosenClient.clientPlayingMetadata
if (!metadata) {
return ''
}
if (metadata.type == 'movie') {
return + metadata.year
}
if (metadata.type == 'episode') {
return metadata.title + ' S' + metadata.parentIndex + '·E' + metadata.index + ''
}
return metadata.index
},
metadata: function () {
if (!this.validPlex) {
return ''
}
if (!this.$store.getters.getChosenClient) {
return ''
}
return this.$store.getters.getChosenClient.clientPlayingMetadata
}
},
methods: {}
}
</script>

View File

@ -9,7 +9,7 @@
</div>
<v-layout wrap row class="pa-4">
<v-flex xs12 md8 offset-md2 class="center-text">
<v-btn class="center" style="background-color: #E5A00D" v-on:click.native="letsGo()">Accept Invite</v-btn>
<v-btn class="center" style="background-color: #E5A00D" @click.native="letsGo()">Accept Invite</v-btn>
</v-flex>
</v-layout>
<p style="opacity:0.7" class="center-text">
@ -25,24 +25,20 @@
export default {
name: 'join',
mounted: function () {
var that = this
console.log('Hello from join...')
this.password = this.$route.query.password
this.room = this.$route.query.room
this.server = this.$route.query.server
this.owner = this.$route.query.owner
if (this.room && this.server) {
// Looks like a valid request...
// Lets setup an auto join and then move the user to /sync
// Looks like a valid request...
// Lets setup an auto join and then move the user to /sync
this.$store.commit('SET_AUTOJOIN', true)
this.$store.commit('SET_AUTOJOINROOM', this.room)
this.$store.commit('SET_AUTOJOINPASSWORD', this.password)
this.$store.commit('SET_AUTOJOINURL', this.server)
}
},
created: function () {
},
data () {
return {
server: null,