示例#1
0
 def beta_134_to_beta_200(self):
     if not is_installed('kano-character-cli'):
         logger.info("kano-character-cli not installed,"
                     " attempt to install kano-profile")
         install('kano-profile')
     run_cmd_log(
         'kano-character-cli -c "judoka" "Hair_Black" "Skin_Orange" -s')
示例#2
0
 def beta_134_to_beta_200(self):
     if not is_installed('kano-character-cli'):
         logger.info(
             "kano-character-cli not installed, "\
             "attempt to install kano-profile"
         )
         install('kano-profile')
     run_cmd_log(
         'kano-character-cli -c "judoka" "Hair_Black" "Skin_Orange" -s'
     )
示例#3
0
from kano.utils import is_installed, run_bg, get_volume, percent_to_millibel
from kano.logging import logger
from .youtube import get_video_file_url


# Support for Gtk versions 3 and 2
try:
    from gi.repository import GObject
except ImportError:
    import gobject as GObject

import playudev

subtitles_dir = '/usr/share/kano-media/videos/subtitles'

omxplayer_present = is_installed('omxplayer')
vlc_present = is_installed('vlc')
if not omxplayer_present and not vlc_present:
    sys.exit('Neither vlc nor omxplayer is installed!')


def play_video(_button=None, video_url=None, localfile=None, subtitles=None,
               init_threads=True, keyboard_engulfer=True):
    """
    Plays a local or remote video using the optimal video player found.
    Handles sound settings and subtitles.
    """

    if video_url:
        logger.info('Getting video url: {}'.format(video_url))
        success, data = get_video_file_url(video_url)
示例#4
0
from kano.utils import is_installed, run_bg, get_volume, percent_to_millibel
from kano.logging import logger
from .youtube import get_video_file_url


# Support for Gtk versions 3 and 2
try:
    from gi.repository import GObject
except ImportError:
    import gobject as GObject

import playudev

subtitles_dir = "/usr/share/kano-media/videos/subtitles"

omxplayer_present = is_installed("omxplayer")
vlc_present = is_installed("vlc")
if not omxplayer_present and not vlc_present:
    sys.exit("Neither vlc nor omxplayer is installed!")


def play_video(_button=None, video_url=None, localfile=None, subtitles=None, init_threads=True, keyboard_engulfer=True):
    """
    Plays a local or remote video using the optimal video player found.
    Handles sound settings and subtitles.
    """

    if video_url:
        logger.info("Getting video url: {}".format(video_url))
        success, data = get_video_file_url(video_url)
        if not success:
示例#5
0
from kano.utils import is_installed, run_bg, get_volume, percent_to_millibel
from kano.logging import logger
from .youtube import get_video_file_url

# Support for Gtk versions 3 and 2
try:
    from gi.repository import GObject
except ImportError:
    import gobject as GObject

import playudev

subtitles_dir = '/usr/share/kano-media/videos/subtitles'

omxplayer_present = is_installed('omxplayer')
vlc_present = is_installed('vlc')
if not omxplayer_present and not vlc_present:
    sys.exit('Neither vlc nor omxplayer is installed!')


def play_video(_button=None,
               video_url=None,
               localfile=None,
               subtitles=None,
               init_threads=True,
               keyboard_engulfer=True):
    """
    Plays a local or remote video using the optimal video player found.
    Handles sound settings and subtitles.
    """