mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
feat: mark media as read when playback reaches 90%
This commit is contained in:
parent
37309adbc0
commit
4f55361f5f
37 changed files with 278 additions and 76 deletions
|
@ -193,11 +193,12 @@ func (s *Storage) UpdateUser(user *model.User) error {
|
|||
default_home_page=$20,
|
||||
categories_sorting_order=$21,
|
||||
mark_read_on_view=$22,
|
||||
media_playback_rate=$23,
|
||||
block_filter_entry_rules=$24,
|
||||
keep_filter_entry_rules=$25
|
||||
mark_read_on_media_player_completion=$23,
|
||||
media_playback_rate=$24,
|
||||
block_filter_entry_rules=$25,
|
||||
keep_filter_entry_rules=$26
|
||||
WHERE
|
||||
id=$26
|
||||
id=$27
|
||||
`
|
||||
|
||||
_, err = s.db.Exec(
|
||||
|
@ -224,6 +225,7 @@ func (s *Storage) UpdateUser(user *model.User) error {
|
|||
user.DefaultHomePage,
|
||||
user.CategoriesSortingOrder,
|
||||
user.MarkReadOnView,
|
||||
user.MarkReadOnMediaPlayerCompletion,
|
||||
user.MediaPlaybackRate,
|
||||
user.BlockFilterEntryRules,
|
||||
user.KeepFilterEntryRules,
|
||||
|
@ -256,11 +258,12 @@ func (s *Storage) UpdateUser(user *model.User) error {
|
|||
default_home_page=$19,
|
||||
categories_sorting_order=$20,
|
||||
mark_read_on_view=$21,
|
||||
media_playback_rate=$22,
|
||||
block_filter_entry_rules=$23,
|
||||
keep_filter_entry_rules=$24
|
||||
mark_read_on_media_player_completion=$22,
|
||||
media_playback_rate=$23,
|
||||
block_filter_entry_rules=$24,
|
||||
keep_filter_entry_rules=$25
|
||||
WHERE
|
||||
id=$25
|
||||
id=$26
|
||||
`
|
||||
|
||||
_, err := s.db.Exec(
|
||||
|
@ -286,6 +289,7 @@ func (s *Storage) UpdateUser(user *model.User) error {
|
|||
user.DefaultHomePage,
|
||||
user.CategoriesSortingOrder,
|
||||
user.MarkReadOnView,
|
||||
user.MarkReadOnMediaPlayerCompletion,
|
||||
user.MediaPlaybackRate,
|
||||
user.BlockFilterEntryRules,
|
||||
user.KeepFilterEntryRules,
|
||||
|
@ -337,6 +341,7 @@ func (s *Storage) UserByID(userID int64) (*model.User, error) {
|
|||
default_home_page,
|
||||
categories_sorting_order,
|
||||
mark_read_on_view,
|
||||
mark_read_on_media_player_completion,
|
||||
media_playback_rate,
|
||||
block_filter_entry_rules,
|
||||
keep_filter_entry_rules
|
||||
|
@ -375,6 +380,7 @@ func (s *Storage) UserByUsername(username string) (*model.User, error) {
|
|||
default_home_page,
|
||||
categories_sorting_order,
|
||||
mark_read_on_view,
|
||||
mark_read_on_media_player_completion,
|
||||
media_playback_rate,
|
||||
block_filter_entry_rules,
|
||||
keep_filter_entry_rules
|
||||
|
@ -413,6 +419,7 @@ func (s *Storage) UserByField(field, value string) (*model.User, error) {
|
|||
default_home_page,
|
||||
categories_sorting_order,
|
||||
mark_read_on_view,
|
||||
mark_read_on_media_player_completion,
|
||||
media_playback_rate,
|
||||
block_filter_entry_rules,
|
||||
keep_filter_entry_rules
|
||||
|
@ -458,6 +465,7 @@ func (s *Storage) UserByAPIKey(token string) (*model.User, error) {
|
|||
u.default_home_page,
|
||||
u.categories_sorting_order,
|
||||
u.mark_read_on_view,
|
||||
u.mark_read_on_media_player_completion,
|
||||
media_playback_rate,
|
||||
u.block_filter_entry_rules,
|
||||
u.keep_filter_entry_rules
|
||||
|
@ -497,6 +505,7 @@ func (s *Storage) fetchUser(query string, args ...interface{}) (*model.User, err
|
|||
&user.DefaultHomePage,
|
||||
&user.CategoriesSortingOrder,
|
||||
&user.MarkReadOnView,
|
||||
&user.MarkReadOnMediaPlayerCompletion,
|
||||
&user.MediaPlaybackRate,
|
||||
&user.BlockFilterEntryRules,
|
||||
&user.KeepFilterEntryRules,
|
||||
|
@ -608,6 +617,7 @@ func (s *Storage) Users() (model.Users, error) {
|
|||
default_home_page,
|
||||
categories_sorting_order,
|
||||
mark_read_on_view,
|
||||
mark_read_on_media_player_completion,
|
||||
media_playback_rate,
|
||||
block_filter_entry_rules,
|
||||
keep_filter_entry_rules
|
||||
|
@ -648,6 +658,7 @@ func (s *Storage) Users() (model.Users, error) {
|
|||
&user.DefaultHomePage,
|
||||
&user.CategoriesSortingOrder,
|
||||
&user.MarkReadOnView,
|
||||
&user.MarkReadOnMediaPlayerCompletion,
|
||||
&user.MediaPlaybackRate,
|
||||
&user.BlockFilterEntryRules,
|
||||
&user.KeepFilterEntryRules,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue