maciek134 / podphoenix

A podcast player for Ubuntu Touch — Podbird reborn
GNU General Public License v3.0
5 stars 6 forks source link

fix query for available Podcasts #21

Closed sergiusens closed 1 year ago

sergiusens commented 1 year ago

The original query introduced in 16fe00d did not list a podcast with fully listened to episodes.

The SQL query has been changed to sum instead of filter for listened.

Fixes #19 and #20

arubislander commented 1 year ago

While this change does fix the intended issue, I am afraid it will introduce bigger lag on startup with bigger databases as now there is no filtering at all on the rows of the Podcast table.

The long term solution might be do rename this the Episodes table, and Create a Podcast table with the rowid, name, episode_count and listened_count, having these fields either be virtual (don't know if that is possible with SQLite) or be updated by triggers.

ilyakooo0 commented 1 year ago

@arubislander I think we should create a separate issue for implementing the long-term solution. Do you mind creating it?

arubislander commented 1 year ago

I see now that there already is such a separation of tables. I need glasses. Anyway, there is a parallel discussion going on in the App Dev telegram channel, so disregard my comment.