Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few major fixes and improvements #3

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fadookie
Copy link

@fadookie fadookie commented Jan 15, 2025

Thanks for publishing this awesome tool. It was recommended to me by the AntennaPod maintainers when I was looking to migrate off of Podcast Addict. I got it working but it took some effort. Here's a PR with all my fixes and new features:

  • (feat) Perform feed matching by feed URL instead of fuzzy matching which seems to have 100% success rate, old method wasn't working at all for me. I believe this closes NO MATCH for all my podcasts #2 if it was the same root cause.
  • (fix) Ignore uninitialized PA feeds
  • (feat) Add support for transferring in-progress episodes
    • This doesn't seem to work 100% of the time, sometimes AP restarts an in-progress episode after the transfer, but it seems to work at least some of the time. I'm not really sure why...
  • (fix) Fix bug in episode URL match fallback logic where it wasn't doing anything when a match was found, and add log message when URL match is successful
  • (fix) Fix error from referencing SimpleChapters.type column which doesn't exist in AP 3.6.1
  • (fix) Remove some unnecessary repeated calls to print function where \n literal could be used instead.
  • (feat) Add TRANSFER_DOWNLOADED_EPISODES setting to control if downloaded episodes are copied. Add additional docs to README about this and other flags.
  • (feat) Add support for transferring tags.
  • (dev tooling) Update .gitignore for pa_to_ap i/o files and PyCharm IDE

I've tested these changes on my own Podcast Addict and AntennaPod apps with a very large database (187 feeds, 442 downloaded episodes) and spot-checked the results. Everything seems to be working apart from the aforementioned issue with in-progress episodes, and I'm not really sure if I can fix that. I think this is OK to merge as-is for now.

…sodes are copied. Add additional docs to README about this and other flags.
- Perform feed matching by feed URL instead of fuzzy matching which
  seems to have 100% success rate, old method wasn't working at all for me.
- Ignore uninitialized PA feeds
- Add support for transferring in-progress episodes
- Fix bug in episode URL match fallback logic where it wasn't doing
  anything when a match was found, and add log message when URL match is successful
- Fix error from referencing SimpleChapters.type column which doesn't
  exist in AP 3.6.1
- Remove some unnecessary repeated calls to print function where \n
  literal could be used instead.
@sroener
Copy link

sroener commented Jan 19, 2025

Thank you @fadookie! You saved me a few hours of work. I tested your version for migrating my podcast and it worked well. I can't say anything about migrating downloaded files, but moving my podcasts and the listened episodes worked.

@fadookie
Copy link
Author

@sroener Awesome! I just pushed another commit that adds support for migrating feed tags. If you want that and already migrated your DB, let me know, I can prepare a branch with a version of this script that only copies tags and leaves everything else alone (I did the same locally as I have already migrated and started using my AP database.)

@sroener
Copy link

sroener commented Jan 24, 2025

@fadookie I already retagged all my podcasts, but thank you! It will be useful for other people. I was just wondering if introducing a CLI would be reasonable instead of setting environment variables for certain options?

@fadookie
Copy link
Author

@sroener Yeah, this is easy to do with python's built-in argparse module, although as I am basically done meeting my needs with my changes I don't know if I have the motivation to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NO MATCH for all my podcasts
2 participants