mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 10:04:39 +02:00
Merge pull request #1360 from ISO-B/fix_remove_internet_connection_check
iOS devices have always networkConnected status true
This commit is contained in:
commit
ea6417dbb1
3 changed files with 9 additions and 4 deletions
|
@ -50,7 +50,7 @@
|
|||
<div id="playerContent" class="playerContainer w-full z-20 absolute bottom-0 left-0 right-0 p-2 pointer-events-auto transition-all" :style="{ backgroundColor: showFullscreen ? '' : coverRgb }" @click="clickContainer">
|
||||
<div v-if="showFullscreen" class="absolute bottom-4 left-0 right-0 w-full pb-4 pt-2 mx-auto px-6" style="max-width: 414px">
|
||||
<div class="flex items-center justify-between pointer-events-auto">
|
||||
<span v-if="!isPodcast && serverLibraryItemId && networkConnected" class="material-icons text-3xl text-fg-muted cursor-pointer" @click="$emit('showBookmarks')">{{ bookmarks.length ? 'bookmark' : 'bookmark_border' }}</span>
|
||||
<span v-if="!isPodcast && serverLibraryItemId && socketConnected" class="material-icons text-3xl text-fg-muted cursor-pointer" @click="$emit('showBookmarks')">{{ bookmarks.length ? 'bookmark' : 'bookmark_border' }}</span>
|
||||
<!-- hidden for podcasts but still using this as a placeholder -->
|
||||
<span v-else class="material-icons text-3xl text-white text-opacity-0">bookmark</span>
|
||||
|
||||
|
@ -375,8 +375,8 @@ export default {
|
|||
return secondsRemaining + 's'
|
||||
}
|
||||
},
|
||||
networkConnected() {
|
||||
return this.$store.state.networkConnected
|
||||
socketConnected() {
|
||||
return this.$store.state.socketConnected
|
||||
},
|
||||
mediaId() {
|
||||
if (this.isPodcast || !this.playbackSession) return null
|
||||
|
|
|
@ -188,7 +188,7 @@ export default {
|
|||
if (libraryItem?.libraryItemId?.startsWith('li_')) {
|
||||
// Detect old library item id
|
||||
console.error('Local library item has old server library item id', libraryItem.libraryItemId)
|
||||
} else if (query.noredirect !== '1' && libraryItem?.libraryItemId && libraryItem?.serverAddress === store.getters['user/getServerAddress'] && store.state.networkConnected) {
|
||||
} else if (query.noredirect !== '1' && libraryItem?.libraryItemId && libraryItem?.serverAddress === store.getters['user/getServerAddress'] && store.state.socketConnected) {
|
||||
const queryParams = new URLSearchParams()
|
||||
queryParams.set('localLibraryItemId', libraryItemId)
|
||||
if (libraryItem.mediaType === 'podcast') {
|
||||
|
|
|
@ -170,6 +170,11 @@ export const mutations = {
|
|||
} else {
|
||||
state.networkConnected = false
|
||||
}
|
||||
if (this.$platform === 'ios') {
|
||||
// Capacitor Network plugin only shows ios device connected if internet access is available.
|
||||
// This fix allows iOS users to use local servers without internet access.
|
||||
state.networkConnected = true
|
||||
}
|
||||
state.networkConnectionType = val.connectionType
|
||||
},
|
||||
setIsNetworkUnmetered(state, val) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue