+
{{ $getString('MessageMediaLinkedToADifferentServer', [localLibraryItem.serverAddress]) }}
@@ -240,10 +237,6 @@ export default {
isLocal() {
return this.libraryItem.isLocal
},
- isLocalOnly() {
- // TODO: Remove the possibility to have local only on android
- return this.isLocal && !this.libraryItem.libraryItemId
- },
hasLocal() {
// Server library item has matching local library item
return this.isLocal || this.libraryItem.localLibraryItem
@@ -282,21 +275,21 @@ export default {
* User is currently connected to a server and this local library item has the same server address
*/
isLocalMatchingServerAddress() {
- if (this.isLocalOnly || !this.localLibraryItem || !this.currentServerAddress) return false
+ if (!this.localLibraryItem || !this.currentServerAddress) return false
return this.localLibraryItem.serverAddress === this.currentServerAddress
},
/**
* User is currently connected to a server and this local library item has the same user id
*/
isLocalMatchingUser() {
- if (this.isLocalOnly || !this.localLibraryItem || !this.user) return false
+ if (!this.localLibraryItem || !this.user) return false
return this.localLibraryItem.serverUserId === this.user.id || this.localLibraryItem.serverUserId === this.user.oldUserId
},
/**
* User is currently connected to a server and this local library item has the same connection config id
*/
isLocalMatchingConnectionConfig() {
- if (this.isLocalOnly || !this.localLibraryItemServerConnectionConfigId || !this.currentServerConnectionConfigId) return false
+ if (!this.localLibraryItemServerConnectionConfigId || !this.currentServerConnectionConfigId) return false
return this.localLibraryItemServerConnectionConfigId === this.currentServerConnectionConfigId
},
bookCoverAspectRatio() {
diff --git a/pages/media/_id/history.vue b/pages/media/_id/history.vue
index ae1e7f4c..fb38c67a 100644
--- a/pages/media/_id/history.vue
+++ b/pages/media/_id/history.vue
@@ -51,9 +51,6 @@ export default {
if (!this.mediaItemHistory) return []
return (this.mediaItemHistory.events || []).sort((a, b) => b.timestamp - a.timestamp)
},
- mediaItemIsLocal() {
- return this.mediaItemHistory && this.mediaItemHistory.isLocal
- },
mediaItemLibraryItemId() {
if (!this.mediaItemHistory) return null
return this.mediaItemHistory.libraryItemId
@@ -91,7 +88,7 @@ export default {
// Collapse saves
if (evt.name === 'Save') {
- let saveName = evt.name + "-" + evt.serverSyncAttempted + "-" + evt.serverSyncSuccess
+ let saveName = evt.name + '-' + evt.serverSyncAttempted + '-' + evt.serverSyncSuccess
if (lastSaveName === saveName && numSaves > 0 && !keyUpdated) {
include = false
const totalInGroup = groups[key].length
@@ -140,19 +137,14 @@ export default {
},
playAtTime(startTime) {
this.$store.commit('setPlayerIsStartingPlayback', this.mediaItemEpisodeId || this.mediaItemLibraryItemId)
- if (this.mediaItemIsLocal) {
- // Local only
- this.$eventBus.$emit('play-item', { libraryItemId: this.mediaItemLibraryItemId, episodeId: this.mediaItemEpisodeId, startTime })
+ // Server may have local
+ const localProg = this.$store.getters['globals/getLocalMediaProgressByServerItemId'](this.mediaItemLibraryItemId, this.mediaItemEpisodeId)
+ if (localProg) {
+ // Has local copy so prefer
+ this.$eventBus.$emit('play-item', { libraryItemId: localProg.localLibraryItemId, episodeId: localProg.localEpisodeId, serverLibraryItemId: this.mediaItemLibraryItemId, serverEpisodeId: this.mediaItemEpisodeId, startTime })
} else {
- // Server may have local
- const localProg = this.$store.getters['globals/getLocalMediaProgressByServerItemId'](this.mediaItemLibraryItemId, this.mediaItemEpisodeId)
- if (localProg) {
- // Has local copy so prefer
- this.$eventBus.$emit('play-item', { libraryItemId: localProg.localLibraryItemId, episodeId: localProg.localEpisodeId, serverLibraryItemId: this.mediaItemLibraryItemId, serverEpisodeId: this.mediaItemEpisodeId, startTime })
- } else {
- // Only on server
- this.$eventBus.$emit('play-item', { libraryItemId: this.mediaItemLibraryItemId, episodeId: this.mediaItemEpisodeId, startTime })
- }
+ // Only on server
+ this.$eventBus.$emit('play-item', { libraryItemId: this.mediaItemLibraryItemId, episodeId: this.mediaItemEpisodeId, startTime })
}
},
getEventIcon(name) {
@@ -211,4 +203,4 @@ export default {
if (this.onMediaItemHistoryUpdatedListener) this.onMediaItemHistoryUpdatedListener.remove()
}
}
-
\ No newline at end of file
+