mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Merge branch 'advplyr:master' into getBookDataFromDir-refactor
This commit is contained in:
		
						commit
						3451a312e9
					
				@ -153,9 +153,6 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    currentChapterName() {
 | 
					    currentChapterName() {
 | 
				
			||||||
      return this.currentChapter ? this.currentChapter.title : ''
 | 
					      return this.currentChapter ? this.currentChapter.title : ''
 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    showExperimentalFeatures() {
 | 
					 | 
				
			||||||
      return this.$store.state.showExperimentalFeatures
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
				
			|||||||
@ -89,9 +89,6 @@ export default {
 | 
				
			|||||||
    offsetTop() {
 | 
					    offsetTop() {
 | 
				
			||||||
      return 64
 | 
					      return 64
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showExperimentalFeatures() {
 | 
					 | 
				
			||||||
      return this.$store.state.showExperimentalFeatures
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    userIsAdminOrUp() {
 | 
					    userIsAdminOrUp() {
 | 
				
			||||||
      return this.$store.getters['user/getIsAdminOrUp']
 | 
					      return this.$store.getters['user/getIsAdminOrUp']
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -74,9 +74,6 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    showExperimentalFeatures() {
 | 
					 | 
				
			||||||
      return this.$store.state.showExperimentalFeatures
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    coverAspectRatio() {
 | 
					    coverAspectRatio() {
 | 
				
			||||||
      return this.$store.getters['getServerSetting']('coverAspectRatio')
 | 
					      return this.$store.getters['getServerSetting']('coverAspectRatio')
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -109,19 +109,14 @@ export default {
 | 
				
			|||||||
    hasValidCovers() {
 | 
					    hasValidCovers() {
 | 
				
			||||||
      var validCovers = this.bookItems.map((bookItem) => bookItem.media.coverPath)
 | 
					      var validCovers = this.bookItems.map((bookItem) => bookItem.media.coverPath)
 | 
				
			||||||
      return !!validCovers.length
 | 
					      return !!validCovers.length
 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    showExperimentalFeatures() {
 | 
					 | 
				
			||||||
      return this.$store.state.showExperimentalFeatures
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    mouseoverCard() {
 | 
					    mouseoverCard() {
 | 
				
			||||||
      this.isHovering = true
 | 
					      this.isHovering = true
 | 
				
			||||||
      // if (this.$refs.groupcover) this.$refs.groupcover.setHover(true)
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mouseleaveCard() {
 | 
					    mouseleaveCard() {
 | 
				
			||||||
      this.isHovering = false
 | 
					      this.isHovering = false
 | 
				
			||||||
      // if (this.$refs.groupcover) this.$refs.groupcover.setHover(false)
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    clickCard() {
 | 
					    clickCard() {
 | 
				
			||||||
      this.$emit('click', this.group)
 | 
					      this.$emit('click', this.group)
 | 
				
			||||||
 | 
				
			|||||||
@ -147,6 +147,9 @@ export default {
 | 
				
			|||||||
    showExperimentalFeatures() {
 | 
					    showExperimentalFeatures() {
 | 
				
			||||||
      return this.store.state.showExperimentalFeatures
 | 
					      return this.store.state.showExperimentalFeatures
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    enableEReader() {
 | 
				
			||||||
 | 
					      return this.store.getters['getServerSetting']('enableEReader')
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    _libraryItem() {
 | 
					    _libraryItem() {
 | 
				
			||||||
      return this.libraryItem || {}
 | 
					      return this.libraryItem || {}
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -287,13 +290,13 @@ export default {
 | 
				
			|||||||
      return this.store.getters['getlibraryItemIdStreaming'] === this.libraryItemId
 | 
					      return this.store.getters['getlibraryItemIdStreaming'] === this.libraryItemId
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showReadButton() {
 | 
					    showReadButton() {
 | 
				
			||||||
      return !this.isSelectionMode && this.showExperimentalFeatures && !this.showPlayButton && this.hasEbook
 | 
					      return !this.isSelectionMode && !this.showPlayButton && this.hasEbook && (this.showExperimentalFeatures || this.enableEReader)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showPlayButton() {
 | 
					    showPlayButton() {
 | 
				
			||||||
      return !this.isSelectionMode && !this.isMissing && !this.isInvalid && !this.isStreaming && (this.numTracks || this.recentEpisode)
 | 
					      return !this.isSelectionMode && !this.isMissing && !this.isInvalid && !this.isStreaming && (this.numTracks || this.recentEpisode)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showSmallEBookIcon() {
 | 
					    showSmallEBookIcon() {
 | 
				
			||||||
      return !this.isSelectionMode && this.showExperimentalFeatures && this.hasEbook
 | 
					      return !this.isSelectionMode && this.hasEbook && (this.showExperimentalFeatures || this.enableEReader)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    isMissing() {
 | 
					    isMissing() {
 | 
				
			||||||
      return this._libraryItem.isMissing
 | 
					      return this._libraryItem.isMissing
 | 
				
			||||||
 | 
				
			|||||||
@ -59,9 +59,6 @@ export default {
 | 
				
			|||||||
      if (this.bookCoverAspectRatio === 1) return this.width / (120 * 1.6 * 2)
 | 
					      if (this.bookCoverAspectRatio === 1) return this.width / (120 * 1.6 * 2)
 | 
				
			||||||
      return this.width / 240
 | 
					      return this.width / 240
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showExperimentalFeatures() {
 | 
					 | 
				
			||||||
      return this.store.state.showExperimentalFeatures
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    store() {
 | 
					    store() {
 | 
				
			||||||
      return this.$store || this.$nuxt.$store
 | 
					      return this.$store || this.$nuxt.$store
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -64,8 +64,7 @@ export default {
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          id: 'manage',
 | 
					          id: 'manage',
 | 
				
			||||||
          title: 'Manage',
 | 
					          title: 'Manage',
 | 
				
			||||||
          component: 'modals-item-tabs-manage',
 | 
					          component: 'modals-item-tabs-manage'
 | 
				
			||||||
          experimental: true
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -26,7 +26,7 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- Split to mp3 -->
 | 
					    <!-- Split to mp3 -->
 | 
				
			||||||
    <div v-if="showMp3Split" class="w-full border border-black-200 p-4 my-8">
 | 
					    <div v-if="showMp3Split && showExperimentalFeatures" class="w-full border border-black-200 p-4 my-8">
 | 
				
			||||||
      <div class="flex items-center">
 | 
					      <div class="flex items-center">
 | 
				
			||||||
        <div>
 | 
					        <div>
 | 
				
			||||||
          <p class="text-lg">Split M4B to MP3's</p>
 | 
					          <p class="text-lg">Split M4B to MP3's</p>
 | 
				
			||||||
@ -51,7 +51,7 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- Embed Metadata -->
 | 
					    <!-- Embed Metadata -->
 | 
				
			||||||
    <div v-if="mediaTracks.length" class="w-full border border-black-200 p-4 my-8">
 | 
					    <div v-if="mediaTracks.length && showExperimentalFeatures" class="w-full border border-black-200 p-4 my-8">
 | 
				
			||||||
      <div class="flex items-center">
 | 
					      <div class="flex items-center">
 | 
				
			||||||
        <div>
 | 
					        <div>
 | 
				
			||||||
          <p class="text-lg">Embed Metadata</p>
 | 
					          <p class="text-lg">Embed Metadata</p>
 | 
				
			||||||
@ -113,6 +113,9 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
 | 
					    showExperimentalFeatures() {
 | 
				
			||||||
 | 
					      return this.$store.state.showExperimentalFeatures
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    libraryItemId() {
 | 
					    libraryItemId() {
 | 
				
			||||||
      return this.libraryItem ? this.libraryItem.id : null
 | 
					      return this.libraryItem ? this.libraryItem.id : null
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -126,9 +126,6 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    showExperimentalFeatures() {
 | 
					 | 
				
			||||||
      return this.$store.state.showExperimentalFeatures
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    media() {
 | 
					    media() {
 | 
				
			||||||
      return this.libraryItem.media || {}
 | 
					      return this.libraryItem.media || {}
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -122,6 +122,20 @@
 | 
				
			|||||||
          </p>
 | 
					          </p>
 | 
				
			||||||
        </ui-tooltip>
 | 
					        </ui-tooltip>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <div class="flex items-center mb-2 mt-8">
 | 
				
			||||||
 | 
					        <h1 class="text-xl">Experimental Feature Settings</h1>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <div class="flex items-center py-2">
 | 
				
			||||||
 | 
					        <ui-toggle-switch v-model="newServerSettings.enableEReader" :disabled="updatingServerSettings" @input="(val) => updateSettingsKey('enableEReader', val)" />
 | 
				
			||||||
 | 
					        <ui-tooltip :text="tooltips.enableEReader">
 | 
				
			||||||
 | 
					          <p class="pl-4 text-lg">
 | 
				
			||||||
 | 
					            Enable e-reader for all users
 | 
				
			||||||
 | 
					            <span class="material-icons icon-text">info_outlined</span>
 | 
				
			||||||
 | 
					          </p>
 | 
				
			||||||
 | 
					        </ui-tooltip>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div class="h-0.5 bg-primary bg-opacity-30 w-full" />
 | 
					    <div class="h-0.5 bg-primary bg-opacity-30 w-full" />
 | 
				
			||||||
@ -169,10 +183,12 @@
 | 
				
			|||||||
        <div>
 | 
					        <div>
 | 
				
			||||||
          <div class="flex items-center">
 | 
					          <div class="flex items-center">
 | 
				
			||||||
            <ui-toggle-switch v-model="showExperimentalFeatures" />
 | 
					            <ui-toggle-switch v-model="showExperimentalFeatures" />
 | 
				
			||||||
            <ui-tooltip :text="experimentalFeaturesTooltip">
 | 
					            <ui-tooltip :text="tooltips.experimentalFeatures">
 | 
				
			||||||
              <p class="pl-4 text-lg">
 | 
					              <p class="pl-4 text-lg">
 | 
				
			||||||
                Experimental Features
 | 
					                Experimental Features
 | 
				
			||||||
                <span class="material-icons icon-text">info_outlined</span>
 | 
					                <a href="https://github.com/advplyr/audiobookshelf/discussions/75" target="_blank">
 | 
				
			||||||
 | 
					                  <span class="material-icons icon-text">info_outlined</span>
 | 
				
			||||||
 | 
					                </a>
 | 
				
			||||||
              </p>
 | 
					              </p>
 | 
				
			||||||
            </ui-tooltip>
 | 
					            </ui-tooltip>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
@ -207,6 +223,7 @@ export default {
 | 
				
			|||||||
      isPurgingCache: false,
 | 
					      isPurgingCache: false,
 | 
				
			||||||
      newServerSettings: {},
 | 
					      newServerSettings: {},
 | 
				
			||||||
      tooltips: {
 | 
					      tooltips: {
 | 
				
			||||||
 | 
					        experimentalFeatures: 'Features in development that could use your feedback and help testing. Click to open github discussion.',
 | 
				
			||||||
        scannerDisableWatcher: 'Disables the automatic adding/updating of items when file changes are detected. *Requires server restart',
 | 
					        scannerDisableWatcher: 'Disables the automatic adding/updating of items when file changes are detected. *Requires server restart',
 | 
				
			||||||
        scannerPreferOpfMetadata: 'OPF file metadata will be used for book details over folder names',
 | 
					        scannerPreferOpfMetadata: 'OPF file metadata will be used for book details over folder names',
 | 
				
			||||||
        scannerPreferAudioMetadata: 'Audio file ID3 meta tags will be used for book details over folder names',
 | 
					        scannerPreferAudioMetadata: 'Audio file ID3 meta tags will be used for book details over folder names',
 | 
				
			||||||
@ -216,7 +233,8 @@ export default {
 | 
				
			|||||||
        bookshelfView: 'Alternative view without wooden bookshelf',
 | 
					        bookshelfView: 'Alternative view without wooden bookshelf',
 | 
				
			||||||
        storeCoverWithItem: 'By default covers are stored in /metadata/items, enabling this setting will store covers in your library item folder. Only one file named "cover" will be kept',
 | 
					        storeCoverWithItem: 'By default covers are stored in /metadata/items, enabling this setting will store covers in your library item folder. Only one file named "cover" will be kept',
 | 
				
			||||||
        storeMetadataWithItem: 'By default metadata files are stored in /metadata/items, enabling this setting will store metadata files in your library item folders. Uses .abs file extension',
 | 
					        storeMetadataWithItem: 'By default metadata files are stored in /metadata/items, enabling this setting will store metadata files in your library item folders. Uses .abs file extension',
 | 
				
			||||||
        coverAspectRatio: 'Prefer to use square covers over standard 1.6:1 book covers'
 | 
					        coverAspectRatio: 'Prefer to use square covers over standard 1.6:1 book covers',
 | 
				
			||||||
 | 
					        enableEReader: 'E-reader is still a work in progress, but use this setting to open it up to all your users (or use the "Experimental Features" toggle below just for you)'
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      showConfirmPurgeCache: false
 | 
					      showConfirmPurgeCache: false
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -229,9 +247,6 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    experimentalFeaturesTooltip() {
 | 
					 | 
				
			||||||
      return 'Features in development that could use your feedback and help testing.'
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    serverSettings() {
 | 
					    serverSettings() {
 | 
				
			||||||
      return this.$store.state.serverSettings
 | 
					      return this.$store.state.serverSettings
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -104,9 +104,6 @@ export default {
 | 
				
			|||||||
    bookCoverAspectRatio() {
 | 
					    bookCoverAspectRatio() {
 | 
				
			||||||
      return this.coverAspectRatio === this.$constants.BookCoverAspectRatio.SQUARE ? 1 : 1.6
 | 
					      return this.coverAspectRatio === this.$constants.BookCoverAspectRatio.SQUARE ? 1 : 1.6
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showExperimentalFeatures() {
 | 
					 | 
				
			||||||
      return this.$store.state.showExperimentalFeatures
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    username() {
 | 
					    username() {
 | 
				
			||||||
      return this.user.username
 | 
					      return this.user.username
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -92,7 +92,8 @@
 | 
				
			|||||||
          <!-- Alerts -->
 | 
					          <!-- Alerts -->
 | 
				
			||||||
          <div v-show="showExperimentalReadAlert" class="bg-error p-4 rounded-xl flex items-center">
 | 
					          <div v-show="showExperimentalReadAlert" class="bg-error p-4 rounded-xl flex items-center">
 | 
				
			||||||
            <span class="material-icons text-2xl">warning_amber</span>
 | 
					            <span class="material-icons text-2xl">warning_amber</span>
 | 
				
			||||||
            <p class="ml-4">Book has no audio tracks but has valid ebook files. The e-reader is experimental and can be turned on in config.</p>
 | 
					            <p v-if="userIsAdminOrUp" class="ml-4">Book has no audio tracks but has an ebook. The experimental e-reader can be enabled in config.</p>
 | 
				
			||||||
 | 
					            <p v-else class="ml-4">Book has no audio tracks but has an ebook. The experimental e-reader must be enabled by a server admin.</p>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <!-- Podcast episode downloads queue -->
 | 
					          <!-- Podcast episode downloads queue -->
 | 
				
			||||||
@ -135,7 +136,7 @@
 | 
				
			|||||||
              {{ isMissing ? 'Missing' : 'Incomplete' }}
 | 
					              {{ isMissing ? 'Missing' : 'Incomplete' }}
 | 
				
			||||||
            </ui-btn>
 | 
					            </ui-btn>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <ui-btn v-if="showExperimentalFeatures && ebookFile" color="info" :padding-x="4" small class="flex items-center h-9 mr-2" @click="openEbook">
 | 
					            <ui-btn v-if="showReadButton" color="info" :padding-x="4" small class="flex items-center h-9 mr-2" @click="openEbook">
 | 
				
			||||||
              <span class="material-icons -ml-2 pr-2 text-white">auto_stories</span>
 | 
					              <span class="material-icons -ml-2 pr-2 text-white">auto_stories</span>
 | 
				
			||||||
              Read
 | 
					              Read
 | 
				
			||||||
            </ui-btn>
 | 
					            </ui-btn>
 | 
				
			||||||
@ -223,6 +224,12 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
 | 
					    showExperimentalFeatures() {
 | 
				
			||||||
 | 
					      return this.$store.state.showExperimentalFeatures
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    enableEReader() {
 | 
				
			||||||
 | 
					      return this.$store.getters['getServerSetting']('enableEReader')
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    userIsAdminOrUp() {
 | 
					    userIsAdminOrUp() {
 | 
				
			||||||
      return this.$store.getters['user/getIsAdminOrUp']
 | 
					      return this.$store.getters['user/getIsAdminOrUp']
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -241,9 +248,6 @@ export default {
 | 
				
			|||||||
    isDeveloperMode() {
 | 
					    isDeveloperMode() {
 | 
				
			||||||
      return this.$store.state.developerMode
 | 
					      return this.$store.state.developerMode
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showExperimentalFeatures() {
 | 
					 | 
				
			||||||
      return this.$store.state.showExperimentalFeatures
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    isPodcast() {
 | 
					    isPodcast() {
 | 
				
			||||||
      return this.libraryItem.mediaType === 'podcast'
 | 
					      return this.libraryItem.mediaType === 'podcast'
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -262,6 +266,9 @@ export default {
 | 
				
			|||||||
      if (this.isPodcast) return this.podcastEpisodes.length
 | 
					      if (this.isPodcast) return this.podcastEpisodes.length
 | 
				
			||||||
      return this.tracks.length
 | 
					      return this.tracks.length
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    showReadButton() {
 | 
				
			||||||
 | 
					      return this.ebookFile && (this.showExperimentalFeatures || this.enableEReader)
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    libraryId() {
 | 
					    libraryId() {
 | 
				
			||||||
      return this.libraryItem.libraryId
 | 
					      return this.libraryItem.libraryId
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -342,7 +349,7 @@ export default {
 | 
				
			|||||||
      return this.media.ebookFile
 | 
					      return this.media.ebookFile
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    showExperimentalReadAlert() {
 | 
					    showExperimentalReadAlert() {
 | 
				
			||||||
      return !this.tracks.length && this.ebookFile && !this.showExperimentalFeatures
 | 
					      return !this.tracks.length && this.ebookFile && !this.showExperimentalFeatures && !this.enableEReader
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    description() {
 | 
					    description() {
 | 
				
			||||||
      return this.mediaMetadata.description || ''
 | 
					      return this.mediaMetadata.description || ''
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										10
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								package.json
									
									
									
									
									
								
							@ -3,7 +3,11 @@
 | 
				
			|||||||
  "version": "2.0.15",
 | 
					  "version": "2.0.15",
 | 
				
			||||||
  "description": "Self-hosted audiobook and podcast server",
 | 
					  "description": "Self-hosted audiobook and podcast server",
 | 
				
			||||||
  "main": "index.js",
 | 
					  "main": "index.js",
 | 
				
			||||||
 | 
					  "watch": {
 | 
				
			||||||
 | 
					    "dev": "server/{*,*/*}/*.js"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
 | 
					    "watch": "npm-watch",
 | 
				
			||||||
    "dev": "node index.js",
 | 
					    "dev": "node index.js",
 | 
				
			||||||
    "start": "node index.js",
 | 
					    "start": "node index.js",
 | 
				
			||||||
    "client": "cd client && npm install && npm run generate",
 | 
					    "client": "cd client && npm install && npm run generate",
 | 
				
			||||||
@ -53,5 +57,7 @@
 | 
				
			|||||||
    "watcher": "^1.2.0",
 | 
					    "watcher": "^1.2.0",
 | 
				
			||||||
    "xml2js": "^0.4.23"
 | 
					    "xml2js": "^0.4.23"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {}
 | 
					  "devDependencies": {
 | 
				
			||||||
}
 | 
					    "npm-watch": "^0.11.0"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -5,10 +5,6 @@ class ServerSettings {
 | 
				
			|||||||
  constructor(settings) {
 | 
					  constructor(settings) {
 | 
				
			||||||
    this.id = 'server-settings'
 | 
					    this.id = 'server-settings'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Misc/Unused
 | 
					 | 
				
			||||||
    this.autoTagNew = false
 | 
					 | 
				
			||||||
    this.newTagExpireDays = 15
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // Scanner
 | 
					    // Scanner
 | 
				
			||||||
    this.scannerParseSubtitle = false
 | 
					    this.scannerParseSubtitle = false
 | 
				
			||||||
    this.scannerFindCovers = false
 | 
					    this.scannerFindCovers = false
 | 
				
			||||||
@ -43,11 +39,16 @@ class ServerSettings {
 | 
				
			|||||||
    // Podcasts
 | 
					    // Podcasts
 | 
				
			||||||
    this.podcastEpisodeSchedule = '0 * * * *' // Every hour
 | 
					    this.podcastEpisodeSchedule = '0 * * * *' // Every hour
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Sorting
 | 
				
			||||||
    this.sortingIgnorePrefix = false
 | 
					    this.sortingIgnorePrefix = false
 | 
				
			||||||
    this.sortingPrefixes = ['the', 'a']
 | 
					    this.sortingPrefixes = ['the', 'a']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Misc Flags
 | 
				
			||||||
    this.chromecastEnabled = false
 | 
					    this.chromecastEnabled = false
 | 
				
			||||||
 | 
					    this.enableEReader = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.logLevel = Logger.logLevel
 | 
					    this.logLevel = Logger.logLevel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.version = null
 | 
					    this.version = null
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (settings) {
 | 
					    if (settings) {
 | 
				
			||||||
@ -56,8 +57,6 @@ class ServerSettings {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  construct(settings) {
 | 
					  construct(settings) {
 | 
				
			||||||
    this.autoTagNew = settings.autoTagNew
 | 
					 | 
				
			||||||
    this.newTagExpireDays = settings.newTagExpireDays
 | 
					 | 
				
			||||||
    this.scannerFindCovers = !!settings.scannerFindCovers
 | 
					    this.scannerFindCovers = !!settings.scannerFindCovers
 | 
				
			||||||
    this.scannerCoverProvider = settings.scannerCoverProvider || 'google'
 | 
					    this.scannerCoverProvider = settings.scannerCoverProvider || 'google'
 | 
				
			||||||
    this.scannerParseSubtitle = settings.scannerParseSubtitle
 | 
					    this.scannerParseSubtitle = settings.scannerParseSubtitle
 | 
				
			||||||
@ -91,6 +90,7 @@ class ServerSettings {
 | 
				
			|||||||
    this.sortingIgnorePrefix = !!settings.sortingIgnorePrefix
 | 
					    this.sortingIgnorePrefix = !!settings.sortingIgnorePrefix
 | 
				
			||||||
    this.sortingPrefixes = settings.sortingPrefixes || ['the', 'a']
 | 
					    this.sortingPrefixes = settings.sortingPrefixes || ['the', 'a']
 | 
				
			||||||
    this.chromecastEnabled = !!settings.chromecastEnabled
 | 
					    this.chromecastEnabled = !!settings.chromecastEnabled
 | 
				
			||||||
 | 
					    this.enableEReader = !!settings.enableEReader
 | 
				
			||||||
    this.logLevel = settings.logLevel || Logger.logLevel
 | 
					    this.logLevel = settings.logLevel || Logger.logLevel
 | 
				
			||||||
    this.version = settings.version || null
 | 
					    this.version = settings.version || null
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -102,8 +102,6 @@ class ServerSettings {
 | 
				
			|||||||
  toJSON() {
 | 
					  toJSON() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      id: this.id,
 | 
					      id: this.id,
 | 
				
			||||||
      autoTagNew: this.autoTagNew,
 | 
					 | 
				
			||||||
      newTagExpireDays: this.newTagExpireDays,
 | 
					 | 
				
			||||||
      scannerFindCovers: this.scannerFindCovers,
 | 
					      scannerFindCovers: this.scannerFindCovers,
 | 
				
			||||||
      scannerCoverProvider: this.scannerCoverProvider,
 | 
					      scannerCoverProvider: this.scannerCoverProvider,
 | 
				
			||||||
      scannerParseSubtitle: this.scannerParseSubtitle,
 | 
					      scannerParseSubtitle: this.scannerParseSubtitle,
 | 
				
			||||||
@ -125,6 +123,7 @@ class ServerSettings {
 | 
				
			|||||||
      sortingIgnorePrefix: this.sortingIgnorePrefix,
 | 
					      sortingIgnorePrefix: this.sortingIgnorePrefix,
 | 
				
			||||||
      sortingPrefixes: [...this.sortingPrefixes],
 | 
					      sortingPrefixes: [...this.sortingPrefixes],
 | 
				
			||||||
      chromecastEnabled: this.chromecastEnabled,
 | 
					      chromecastEnabled: this.chromecastEnabled,
 | 
				
			||||||
 | 
					      enableEReader: this.enableEReader,
 | 
				
			||||||
      logLevel: this.logLevel,
 | 
					      logLevel: this.logLevel,
 | 
				
			||||||
      version: this.version
 | 
					      version: this.version
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -418,7 +418,7 @@ module.exports = {
 | 
				
			|||||||
                  books: [libraryItemJson],
 | 
					                  books: [libraryItemJson],
 | 
				
			||||||
                  inProgress: bookInProgress,
 | 
					                  inProgress: bookInProgress,
 | 
				
			||||||
                  bookInProgressLastUpdate: bookInProgress ? mediaProgress.lastUpdate : null,
 | 
					                  bookInProgressLastUpdate: bookInProgress ? mediaProgress.lastUpdate : null,
 | 
				
			||||||
                  firstBookUnread: bookInProgress ? libraryItemJson : null
 | 
					                  firstBookUnread: bookInProgress ? null : libraryItemJson
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                seriesMap[librarySeries.id] = series
 | 
					                seriesMap[librarySeries.id] = series
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user