Skip to content

Commit

Permalink
revert resetting resume state for already watched items
Browse files Browse the repository at this point in the history
  • Loading branch information
elgatito committed Dec 25, 2019
1 parent d2aa800 commit 1b61f14
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions library/trakt.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,9 @@ func updateMovieWatched(m *trakt.WatchedMovie, watched bool) {
if watched && !r.IsWatched() {
r.UIDs.Playcount = 1
xbmc.SetMovieWatchedWithDate(r.UIDs.Kodi, 1, 0, 0, m.LastWatchedAt)
} else if watched && r.IsWatched() && r.Resume != nil && r.Resume.Position > 0 {
xbmc.SetMovieWatchedWithDate(r.UIDs.Kodi, 1, 0, 0, m.LastWatchedAt)
// TODO: There should be a check for allowing resume state, otherwise we always reset it for already searched items
// } else if watched && r.IsWatched() && r.Resume != nil && r.Resume.Position > 0 {
// xbmc.SetMovieWatchedWithDate(r.UIDs.Kodi, 1, 0, 0, m.LastWatchedAt)
} else if !watched && r.IsWatched() {
r.UIDs.Playcount = 0
xbmc.SetMoviePlaycount(r.UIDs.Kodi, 0)
Expand All @@ -417,8 +418,9 @@ func updateShowWatched(s *trakt.WatchedShow, watched bool) {
if watched && !e.IsWatched() {
e.UIDs.Playcount = 1
xbmc.SetEpisodeWatchedWithDate(e.UIDs.Kodi, 1, 0, 0, episode.LastWatchedAt)
} else if watched && e.IsWatched() && e.Resume != nil && e.Resume.Position > 0 {
xbmc.SetEpisodeWatchedWithDate(e.UIDs.Kodi, 1, 0, 0, episode.LastWatchedAt)
// TODO: There should be a check for allowing resume state, otherwise we always reset it for already searched items
// } else if watched && e.IsWatched() && e.Resume != nil && e.Resume.Position > 0 {
// xbmc.SetEpisodeWatchedWithDate(e.UIDs.Kodi, 1, 0, 0, episode.LastWatchedAt)
} else if !watched && e.IsWatched() {
e.UIDs.Playcount = 0
xbmc.SetEpisodePlaycount(e.UIDs.Kodi, 0)
Expand Down

0 comments on commit 1b61f14

Please sign in to comment.