mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-26 21:59:38 +00:00
This commit is contained in:
parent
03963aa9a1
commit
b9dee8704f
5 changed files with 93 additions and 38 deletions
|
|
@ -56,6 +56,28 @@
|
|||
</li>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
|
||||
<div v-if="showExperimentalFeatures" class="p-4">
|
||||
<ui-btn :loading="checkingTrackNumbers" small @click="checkTrackNumbers">Check Track Numbers</ui-btn>
|
||||
<div v-if="trackNumData && trackNumData.length" class="w-full max-w-4xl py-2">
|
||||
<table class="tracksTable">
|
||||
<tr>
|
||||
<th class="text-left">Filename</th>
|
||||
<th class="w-32">Index</th>
|
||||
<th class="w-32"># From Metadata</th>
|
||||
<th class="w-32"># From Filename</th>
|
||||
<th class="w-32"># From Probe</th>
|
||||
</tr>
|
||||
<tr v-for="trackData in trackNumData" :key="trackData.filename">
|
||||
<td class="text-xs">{{ trackData.filename }}</td>
|
||||
<td class="text-center">{{ trackData.currentTrackNum }}</td>
|
||||
<td class="text-center">{{ trackData.trackNumFromMeta }}</td>
|
||||
<td class="text-center">{{ trackData.trackNumFromFilename }}</td>
|
||||
<td class="text-center">{{ trackData.scanDataTrackNum }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -95,7 +117,9 @@ export default {
|
|||
group: 'description',
|
||||
ghostClass: 'ghost'
|
||||
},
|
||||
saving: false
|
||||
saving: false,
|
||||
checkingTrackNumbers: false,
|
||||
trackNumData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -172,9 +196,26 @@ export default {
|
|||
},
|
||||
streamAudiobook() {
|
||||
return this.$store.state.streamAudiobook
|
||||
},
|
||||
showExperimentalFeatures() {
|
||||
return this.$store.state.showExperimentalFeatures
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkTrackNumbers() {
|
||||
this.checkingTrackNumbers = true
|
||||
this.$axios
|
||||
.$get(`/api/scantracks/${this.audiobookId}`)
|
||||
.then((res) => {
|
||||
console.log('RES', res)
|
||||
this.trackNumData = res
|
||||
this.checkingTrackNumbers = false
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed', error)
|
||||
this.checkingTrackNumbers = false
|
||||
})
|
||||
},
|
||||
includeToggled(audio) {
|
||||
var new_index = 0
|
||||
if (audio.include) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue