示例#1
0
    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)
示例#2
0
 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)
示例#3
0
    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)
示例#4
0
    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)
示例#5
0
 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(
         )
示例#6
0
    def clipboard_changed(self):
        text = self.clipboard().text()
        logger.info(text)

        self.b.insertPlainText(text + '\n')