alexhartm / tonie-podcast-sync

allows synching podcast episodes to Toniebox creative tonies

Home Page:https://pypi.org/project/tonie-podcast-sync/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get episode by date or random episodes

stefan14808 opened this issue · comments

Hi,

thank you for your great work.
currently i am synching the Sandmänchen Podcast and the feed is not sorted by date but rather grouped in weekdays:
https://www.antennebrandenburg.de/programm/hoeren/podcasts/Zappelduster_Podcast/podcast.xml/feed=podcast.xml
so I only get the "monday" episodes.
could the episodes be orderd by date?
Another idea is if it would be possible to add a "raondom order" parameter for selecting episodes.
that could be very useful for stale podcast that has many episodes.

Kind Regards Stefan

parameter for random episodes would be very useful.
Checker Tobi is in the summer holidays, so there is always one episode telling me, that they are in holidays now.

I made some changes in my forked repo @alexhartm can you please check and merge.

Has been merged. I'm more than happy about your excellent contribution @Wilhelmsson177 - many thanks again! I also build and uploaded a new pip package version to pypi.

Unfortunately, it looks like pypi does not allow direct references to other github repos. Thats why I had to revert back to the submodule approach (also added a comment on this in pyproject.toml). Best would be imho if tonie_api could be made available on pypi as a regular package. In the meantime, to my knowledge using git submodules is the only workaround right now. Let me know if you know of something better though.

Note that with the change, a fairly recent Python version is required (3.10.11 or higher). If you face issues updating to the new tonie-podcast-sync package version, you might want to check that your Python installation is sufficiently new (and update if required).

I thank you for the initial idea of the project. The contribution was a bit more than just fixing the addressed issues. Just for python practice, I have some more ideas. Like a CLI for configuring the tool. I also requested the maintainer of the tonie_api if it can be published to pypi to get rid of this packaging issue.

Thanks to @Wilhelmsson177 for coding the feature and to @alexhartm for integrating it so quickly. It works great :)

Hi 👋🏽, I tried to use the random ordering of the episodes but couldn't manage to do it.

With

from toniepodcastsync import Podcast, EpisodeSorting

tobi = Podcast("https://feeds.br.de/checkpod-der-podcast-mit-checker-tobi/feed.xml", episode_sorting = EpisodeSorting.RANDOM)

I ran into an ImportError: cannot import name 'EpisodeSorting' from 'toniepodcastsync'. I got around this by copying the enum class into the file itself. However, the episodes are still sorted starting with the most recent. I also had to wipe the tonie manually, otherwise it would have thrown

Podcast 'CheckPod - Der Podcast mit Checker Tobi' has no new episodes, latest episode is 'Winterpause - eine schöne Zeit euch! (Fri, 15 Dec 2023 06:00:00 +0100)'

What am I missing?

Thanks for the feedback @maltebaer. I have just pushed a commit + new pip package version (2.0.2) where I slightly changed the import handling of the EpisodeSorting enum. I have also updated README.md to highlight the feature a bit.
Let me know if you still face issues with that

@all-contributors please add @maltebaer for bug reporting

@alexhartm

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

I've put up a pull request to add @maltebaer! 🎉

Awesome, it works now. Thanks for the quick fix!