Exemplo n.º 1
0
    def _handle_bookmark(self):
        if g.get_global_setting("marked_watched_dialog_open"):
            return

        try:
            database.clear_local_bookmarks()
        except OperationalError:
            pass

        if self.current_time == 0 or self.total_time == 0:
            self.bookmark_sync.remove_bookmark(self.trakt_id)
            return

        if (
                self.watched_percentage < self.playCountMinimumPercent
                and self.current_time >= self.ignoreSecondsAtStart
                and not self._force_marked_watched
         ):
            self.bookmark_sync.set_bookmark(
                self.trakt_id,
                int(self.current_time),
                self.mediatype,
                self.watched_percentage,
                )
        else:
            self.bookmark_sync.remove_bookmark(self.trakt_id)
Exemplo n.º 2
0
    def handleBookmark(self):
        if self.media_length == 0 or self.current_time == 0:
            bookmark_sync.remove_bookmark(self.trakt_id)
            return

        if self.getWatchedPercent() < 80 and self.current_time >= 60:
            bookmark_sync.set_bookmark(self.trakt_id, self.current_time)
        else:
            bookmark_sync.remove_bookmark(self.trakt_id)

        try:
            database.clear_local_bookmarks()
        except:
            pass