dyerc/Doughnut

FR/Discussion: Better logic to mark episode as played

woj-tek opened this issue · 4 comments

Currently Doughnut marks the episode as played after 90% ( private static let playedThreshold: Double = 0.9 ), which if fine most of the time, especially for shorter/regular podcasts (30 minutes gives you 3 minutes left, which quite often is also just promotion). For longer episodes (more than 2h) it rises to almost 15 minutes, which quite often covers entire section of the podcast.

I'm not really sure what would be the best solution here. Maybe use fixed time (if left less than x minutes)? But that's more rigid and could break for shorter episodes (less than 5 minutes). Maybe increase the percentage to 95-97% of played time? Possibly make it configurable (advanced section, user could choose percentage or fixed remaining time and possibly set the value bye themselves)?

In my opinion, this behavior can cause confusion when the unplayed filter is on, and the episode disappeared from the list while it still has minutes to play. Some apps (e.g. Apple's Mail) update the filtered list in a delayed behavior. While the properties of the filtered items changed due to user interaction, they won't disappear immediately. Doughnut should probably implement a similar behavior.

For the threshold, a fixed time should be better than a percentage, but currently I have no clear idea how we should handle it. Most podcast clients seem to mark episodes as played only when the entire episode ends and adding a preference to control this behavior might introduce too much complexity for the user.

I was pondering this a little bit more and I think "KISS" here would be the best - simply mark the episode as played at 100%. It would disappear from the list only once it's played and that's correct/expected. I don't see any action that I would need to take with the episode (like read the description to check something) at that point. Not implementing logic of delayed behaviour would also mean simpler code. I think AntenaPod behaves in such manner.

Yes, I submitted this issue because I almost always use unplayed filter, both for podcasts and episodes, and the latter disappearing while there is still content to be played is somewhat confusing.

tl,dr;
IMHO playedThreshold should be just removed altogether.

dyerc commented

I originally had the 90% threshold because a lot of podcasts I listened to had adverts at the end which I would not listen to in full. Having the threshold hold meant I didn't need to manually seek/skip to the end. Plus it was how Instacast (where I borrowed lots of inspiration from) handled things.

My preference would be to have this as a setting, even if we make it by default 100%. I'm quite happy to put a PR together.

I think nowadays in Patreon age ads are less popular and if they happen usually mid-episode (to make the skipping harder). Granted, content at the end is somewhat less relevant usually (thanks and so on) but still - that's not a rule.

So, to summarise: have it as an percentage option with 100% default?