def unmark_discarded(self): """ Mark the video as un-discarded :return: """ logger.info('Un-discarded: {:2d}: {}'.format(self.id, self.video)) update_plaintext_history('Un-discarded: {} '.format(self.video)) self.status_bar.showMessage('Un-discarded: {}'.format(self.video)) self.history.add(self.video, self.unmark_discarded, self.mark_discarded)
def delete_downloaded_data(self): """ Deletes the downloaded data/file(s) from disk. :return: """ logger.info('Deleted downloaded data: {}'.format(self.video)) update_plaintext_history('Deleted downloaded data: {}'.format( self.video)) # Anti-Action passed as None, as you can't un-delete. self.history.add(self.video, self.delete_downloaded_data, None, inactive=True)
def unmark_livestream(self): """ Unmark the video as live broadcast content (live) :return: """ logger.info('Unmarked as livestream: {:2d}: {}'.format( self.id, self.video)) update_plaintext_history('Unmarked as livestream: {} '.format( self.video)) self.status_bar.showMessage('Unmarked as livestream: {}'.format( self.video)) self.color_live_video() self.history.add(self.video, self.unmark_livestream, self.mark_livestream)
def mark_premiere(self): """ Mark the video as live broadcast content (premiere) A premiere is: upcoming stream --> live stream --> vod :return: """ logger.info('Marked as premiere: {:2d}: {}'.format( self.id, self.video)) update_plaintext_history('Marked as premiere: {} '.format(self.video)) self.status_bar.showMessage('Marked as premiere: {}'.format( self.video)) self.color_live_video() self.history.add(self.video, self.mark_premiere, self.unmark_premiere)
def mark_downloaded(self): """ Mark the video as downloaded :return: """ logger.info('Mark downloaded: {:2d}: {}'.format(self.id, self.video)) update_plaintext_history('Downloaded: {}'.format(self.video)) self.video.date_downloaded = datetime.datetime.utcnow() if read_config('Gui', 'enable_auto_copy_to_clipboard'): self.copy_url() if read_config('Youtube-dl', 'use_youtube_dl'): self.status_bar.showMessage( 'Downloading video with youtube-dl: {}'.format(self.video)) self.parent.main_model.playback_grid_view_listener.tileDownloaded.emit( self.video) # Update Subfeed to remove the video from its list unless show_downloaded=True. if not read_config('SubFeed', 'show_downloaded'): self.parent.main_model.subfeed_grid_view_listener.videosChanged.emit( )
def clipboard_changed(self): text = self.clipboard().text() logger.info(text) self.b.insertPlainText(text + '\n')