XilinJia / Podcini

Open source podcast instrument for Android in Kotlin with media3, supporting channels, playlists, podcasts and single media from YouTube and YT Music as well as normal podcasts.
GNU General Public License v3.0
158 stars 7 forks source link

Possible issues from importing an AP Full DB Backup #24

Closed Mrnofish closed 3 months ago

Mrnofish commented 6 months ago

Checklist

App version

4.4.0

Where did you get the app from

Other

Android version

LOS 20

Device model

guacamole

First occurred

Today

Steps to reproduce

  1. Take full DB export from AP
  2. Import DB in podcini
  3. Navigate to downloads
  4. Verify the cache status appears the same as inside AP
  5. Check Subs > Statistics > Downloads, the size of the cache is reported to be the same as inside AP

Expected behaviour

I was expecting the app to behave as its cache was empty.

Current behaviour

As far as I can remember, the AP cache should be stored inside the app's own directory under Android/data, so Podcini shouldn't be able to access AP's cache.

When I checked Subs > Statistics, the app was claiming the cache was as large as AP's.

I'm not sure what the issue is here, perhaps a snapshot of the cache status is stored inside the DB and the app didn't check it against the filesystem after importing the DB ?

I would expect users switching from AP to try the same, so there may be some thinking about what's appropriate for the app to do in that situation.

Displaying a warning could be a starting point.

Logs

No response

XilinJia commented 6 months ago

Thanks for reporting. I've noticed this earlier on. Though I haven't looked into it, I suspected those numbers and info are stored in the DB and so get all imported. As to the actual downloaded files, they are not imported and don't exist, so some info shown are false.

Yes, I agree this deserves some reasoning.

BTW, I suspect AP behaves the same as the part of import routines are inherited from it

o0nd7ots commented 6 months ago

by the way when I imported the antennapod backup all my downloads showed up but upon trying to play them back threw some error and marked as not downloaded.

Mrnofish commented 6 months ago

@o0nd7ots that's normal, it's due to AP dealing with downloads as a cache: that means the files are all stored stored inside the app's private directory which is inaccessible to other apps.

For a full migration, you'll need a way to copy or move the downloaded files inside Podcini's own cache directory. adb shell might be one.

o0nd7ots commented 6 months ago

I thought that it had something to do with the app isolation. It is not a problem to me -- I just wanted to let you know in case this was not working as intended.

XilinJia commented 5 months ago

Since version 4.10.0 and/or AntennaPod 3.3.2, AntennaPod's DB can not be directly imported. Possibilities need to be investigated.

XilinJia commented 3 months ago

Podcini.R uses Realm DB, so the SQLite DB of AntennaPod or even Podcini version 5 and below can not be imported reasonable effort.