Beispiel #1
0
def download():
  try:
    if not os.path.isdir(__tmp__):
      os.mkdir(__tmp__)
    if not os.path.exists(__tmp__ + __file__):
      oe.download_file(__url__, __tmp__ + __file__)
  except Exception, e:
    oe.notify('Chromium', 'Could not download file')
Beispiel #2
0
def download():
    try:
        if not os.path.isdir(__tmp__):
            os.mkdir(__tmp__)
        if not os.path.exists(__tmp__ + __file__):
            oe.download_file(__url__, __tmp__ + __file__)
    except Exception, e:
        oe.notify('Chromium', 'Could not download file')
Beispiel #3
0
def widevine():
  try:
    if not os.path.isdir(__tmp__):
      os.mkdir(__tmp__)
    if not os.path.exists(__tmp__ + __file__):
      oe.download_file(__url__, __tmp__ + __file__)
    oe.notify('Chromium', 'Extracting libwidevinecdm.so')
    oe.execute('cd ' + __tmp__ + ' && ar -x ' + __file__)
    oe.execute('tar xf ' + __tmp__ + __tar__ + ' -C ' + __tmp__ + ' ./' + __lib__)
    oe.copy_file(__tmp__ + __lib__, __path__ + __lib__.split('/')[-1])
    oe.notify('Chromium', 'Installation of libwidevinecdm.so succeeded')
  except Exception, e:
    oe.notify('Chromium', 'Installation of libwidevinecdm.so failed')
Beispiel #4
0
def install_flash():
    __url__ = 'https://fpdownload.adobe.com/pub/flashplayer/pdc/24.0.0.186/flash_player_ppapi_linux.x86_64.tar.gz'
    __file__ = __url__.split('/')[-1]
    __tmp__ = '/tmp/pepperflash/'
    __lib__ = 'libpepflashplayer.so'
    try:
        if not os.path.isdir(__tmp__):
            os.mkdir(__tmp__)
        if not os.path.exists(__tmp__ + __file__):
            oe.download_file(__url__, __tmp__ + __file__)
        if not os.path.exists(__tmp__ + __file__):
            oe.notify('Chromium', 'Could not download file')
        else:
            oe.notify('Chromium', 'Extracting libpepflashplayer.so')
        if not os.path.isdir(__tmp__ + __file__):
            oe.execute('tar zxf ' + __tmp__ + __file__ + ' -C ' + __tmp__ + '')
        if not os.path.isdir(__path__ + 'PepperFlash'):
            os.mkdir(__path__ + 'PepperFlash')
        oe.copy_file(__tmp__ + __lib__, __path__ + 'PepperFlash/' + __lib__)
        oe.notify('Chromium', 'Installation of libpepflashplayer.so succeeded')
    except Exception, e:
        oe.notify('Chromium', 'Installation of libpepflashplayer.so failed')
Beispiel #5
0
def install_widevine():
  __url__   = 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
  __file__  = __url__.split('/')[-1]
  __tar__   = 'data.tar.xz'
  __tmp__   = '/tmp/widevine/'
  __lib__   = 'opt/google/chrome/libwidevinecdm.so'
  try:
    if not os.path.isdir(__tmp__):
      os.mkdir(__tmp__)
    if not os.path.exists(__tmp__ + __file__):
      oe.download_file(__url__, __tmp__ + __file__)
    if not os.path.exists(__tmp__ + __file__):
      oe.notify('Chromium', 'Could not download file')
    else:
      oe.notify('Chromium', 'Extracting libwidevinecdm.so')
    if not os.path.isdir(__tmp__ + __tar__):
      oe.execute('cd ' + __tmp__ + ' && ar -x ' + __file__)
    oe.execute('tar xf ' + __tmp__ + __tar__ + ' -C ' + __tmp__ + ' ./' + __lib__)
    oe.copy_file(__tmp__ + __lib__, __path__ + __lib__.split('/')[-1])
    oe.notify('Chromium', 'Installation of libwidevinecdm.so succeeded')
  except Exception, e:
    oe.notify('Chromium', 'Installation of libwidevinecdm.so failed')
Beispiel #6
0
def install_flash():
  __url__   = 'https://fpdownload.adobe.com/pub/flashplayer/pdc/24.0.0.186/flash_player_ppapi_linux.x86_64.tar.gz'
  __file__  = __url__.split('/')[-1]
  __tmp__   = '/tmp/pepperflash/'
  __lib__ = 'libpepflashplayer.so'
  try:
    if not os.path.isdir(__tmp__):
      os.mkdir(__tmp__)
    if not os.path.exists(__tmp__ + __file__):
      oe.download_file(__url__, __tmp__ + __file__)
    if not os.path.exists(__tmp__ + __file__):
      oe.notify('Chromium', 'Could not download file')
    else:
      oe.notify('Chromium', 'Extracting libpepflashplayer.so')
    if not os.path.isdir(__tmp__ + __file__):
      oe.execute('tar zxf ' + __tmp__ + __file__ + ' -C ' + __tmp__ + '')
    if not os.path.isdir(__path__ + 'PepperFlash'):
      os.mkdir(__path__ + 'PepperFlash')
    oe.copy_file(__tmp__ + __lib__, __path__ + 'PepperFlash/' + __lib__)
    oe.notify('Chromium', 'Installation of libpepflashplayer.so succeeded')
  except Exception, e:
    oe.notify('Chromium', 'Installation of libpepflashplayer.so failed')
Beispiel #7
0
def install_widevine():
  __url__   = 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
  __file__  = __url__.split('/')[-1]
  __tar__   = 'data.tar.xz'
  __tmp__   = '/tmp/widevine/'
  __lib__   = 'opt/google/chrome/libwidevinecdm.so'
  try:
    if not os.path.isdir(__tmp__):
      os.mkdir(__tmp__)
    if not os.path.exists(__tmp__ + __file__):
      oe.download_file(__url__, __tmp__ + __file__)
    if not os.path.exists(__tmp__ + __file__):
      oe.notify('Chromium', 'Could not download file')
    else:
      oe.notify('Chromium', 'Extracting libwidevinecdm.so')
    if not os.path.isdir(__tmp__ + __tar__):
      oe.execute('cd ' + __tmp__ + ' && ar -x ' + __file__)
    oe.execute('tar xf ' + __tmp__ + __tar__ + ' -C ' + __tmp__ + ' ./' + __lib__)
    oe.copy_file(__tmp__ + __lib__, __path__ + __lib__.split('/')[-1])
    oe.notify('Chromium', 'Installation of libwidevinecdm.so succeeded')
  except Exception, e:
    oe.notify('Chromium', 'Installation of libwidevinecdm.so failed')
 def do_autoupdate(self, listItem=None, silent=False):
     if hasattr(self, 'update_file'):
         if not os.path.exists(self.LOCAL_UPDATE_DIR):
             os.makedirs(self.LOCAL_UPDATE_DIR)
         downloaded = oe.download_file(self.update_file, oe.TEMP + 'update_file', silent)
         if not downloaded is None:
             self.update_file = self.update_file.split('/')[-1]
             if self.struct['update']['settings']['UpdateNotify']['value'] == '1':
                 oe.notify(oe._(32363), oe._(32366))
             shutil.move(oe.TEMP + 'update_file', self.LOCAL_UPDATE_DIR + self.update_file)
             os.sync()
             if silent == False:
                 oe.winOeMain.close()
                 oe.xbmcm.waitForAbort(1)
                 subprocess.call(['/usr/bin/systemctl', '--no-block', 'reboot'], close_fds=True)
         else:
             delattr(self, 'update_in_progress')