Rebuilding audio player and handling playback sessions in android. Moving all logic natively

This commit is contained in:
advplyr
2022-04-02 12:12:00 -05:00
parent 314dc960f2
commit f70f707100
19 changed files with 180 additions and 596 deletions
+3 -3
View File
@@ -102,8 +102,8 @@ export default {
// When all items are up-to-date then local media items are not returned
if (response.localMediaItems.length) {
this.localMediaItems = response.localMediaItems.map((mi) => {
if (mi.coverPath) {
mi.coverPathSrc = Capacitor.convertFileSrc(mi.coverPath)
if (mi.coverContentUrl) {
mi.coverPathSrc = Capacitor.convertFileSrc(mi.coverContentUrl)
}
return mi
})
@@ -123,7 +123,7 @@ export default {
this.localMediaItems = items.map((lmi) => {
return {
...lmi,
coverPathSrc: lmi.coverPath ? Capacitor.convertFileSrc(lmi.coverPath) : null
coverPathSrc: lmi.coverContentUrl ? Capacitor.convertFileSrc(lmi.coverContentUrl) : null
}
})
if (this.shouldScan) {
+2 -2
View File
@@ -15,7 +15,7 @@
<div v-if="!localFolders.length" class="flex justify-center">
<p class="text-center">No Media Folders</p>
</div>
<div class="flex p-2 border-t border-primary mt-2">
<div class="flex border-t border-primary my-4">
<div class="flex-grow pr-1">
<ui-dropdown v-model="newFolderMediaType" placeholder="Select media type" :items="mediaTypeItems" />
</div>
@@ -56,7 +56,7 @@ export default {
methods: {
async selectFolder() {
if (!this.newFolderMediaType) {
return this.$toast.warn('Must select a media type')
return this.$toast.error('Must select a media type')
}
var folderObj = await StorageManager.selectFolder({ mediaType: this.newFolderMediaType })
if (folderObj.error) {