mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-17 21:56:07 -04:00
youtube: Started code for playback from youtube. Not functionnal, yet
This commit is contained in:
@@ -17,6 +17,7 @@ import config
|
||||
import sound
|
||||
import languageHandler
|
||||
import logging
|
||||
import youtube_utils
|
||||
from twitter import compose, utils
|
||||
from mysc.thread_utils import call_threaded
|
||||
from twython import TwythonError
|
||||
@@ -623,6 +624,8 @@ class baseBufferController(bufferController):
|
||||
def audio(self, url='', *args, **kwargs):
|
||||
if hasattr(sound.URLPlayer,'stream') and sound.URLPlayer.stream.is_playing == True:
|
||||
return sound.URLPlayer.stop_audio(delete=True)
|
||||
elif sound.URLPlayer.mode == "youtube":
|
||||
return sound.URLPlayer.stop_audio()
|
||||
tweet = self.get_tweet()
|
||||
if tweet == None: return
|
||||
urls = utils.find_urls(tweet)
|
||||
|
@@ -2,6 +2,7 @@
|
||||
import platform
|
||||
system = platform.system()
|
||||
import application
|
||||
import youtube_utils
|
||||
if system == "Windows":
|
||||
from update import updater
|
||||
from wxUI import (view, dialogs, commonMessageDialogs, sysTrayIcon)
|
||||
@@ -655,6 +656,7 @@ class Controller(object):
|
||||
self.exit_()
|
||||
|
||||
def exit_(self, *args, **kwargs):
|
||||
youtube_utils.stop()
|
||||
for i in self.buffers: i.save_positions()
|
||||
log.debug("Exiting...")
|
||||
log.debug("Saving global configuration...")
|
||||
|
Reference in New Issue
Block a user