예제 #1
0
    def onPlayBackStopped(self):
        bookmarks().reset(self.currentTime, self.totalTime, self.name,
                          self.year)

        try:
            self.progress_tot_items = 0
            try:
                if self.content == 'movie':
                    self.progress_tot_items = len(
                        favourites.getProgress('movies'))
                elif self.content == 'episode':
                    self.progress_tot_items = len(
                        favourites.getProgress('episode'))
            except:
                self.progress_tot_items = 0
            if not int(self.progress_tot_items) > int(inprogress_limit):
                if inprogress_db == 'true':
                    watch_progress = self.currentTime / self.totalTime >= .0020
                    ended_progress = self.currentTime / self.totalTime >= .85
                    if watch_progress:
                        if self.content == 'movie':
                            self.add_progress_movies(self.original_meta)
                        elif self.content == 'episode':
                            self.add_progress_episodes(self.original_meta)
                    if ended_progress:
                        if self.content == 'movie':
                            self.remove_progress_movies(self.original_meta)
                        # elif self.content == 'episode': self.remove_progress_episodes(self.original_meta)
        except:
            pass
예제 #2
0
    def onPlayBackStopped(self):
        bookmarks().reset(self.currentTime, self.totalTime, self.name, self.year)
		
        try:
			self.progress_tot_items = 0
			try:
				if self.content == 'movie': self.progress_tot_items = len(favourites.getProgress('movies'))
				elif self.content == 'episode': self.progress_tot_items = len(favourites.getProgress('episode'))
			except:
				self.progress_tot_items = 0
			if not int(self.progress_tot_items) > int(inprogress_limit):
				if inprogress_db == 'true':
					watch_progress =  self.currentTime / self.totalTime >= .0020
					ended_progress =  self.currentTime / self.totalTime >= .85
					if watch_progress:
						if self.content == 'movie': self.add_progress_movies(self.original_meta)
						elif self.content == 'episode': self.add_progress_episodes(self.original_meta)
					if ended_progress:
						if self.content == 'movie': self.remove_progress_movies(self.original_meta)
						# elif self.content == 'episode': self.remove_progress_episodes(self.original_meta)
        except:
				pass