Exemplo n.º 1
0
from os import path
import sys, os
LIB_PATH = path.join(path.abspath(path.dirname(__file__)), "lib")
sys.path.append(LIB_PATH)
import locations, gitutils, cherrypy

# Do not allow running as root
if os.geteuid() == 0:
  print "BlissFlixx should not be run as superuser."
  print "Please run again but without using sudo."
  sys.exit(1)

# Check if first time run and need to finish install
if not path.exists(locations.YTUBE_PATH):
  cherrypy.log("Finishing Installation. Please wait...")
  gitutils.clone(locations.LIB_PATH,"https://github.com/rg3/youtube-dl.git")

  datapath = locations.DATA_PATH
  playlists = os.path.join(datapath, "playlists")
  settings = os.path.join(datapath, "settings")
  if not os.path.exists(locations.PLUGIN_PATH):
    os.makedirs(locations.PLUGIN_PATH)
  if not os.path.exists(datapath):
    os.makedirs(datapath)
  if not os.path.exists(playlists):
    os.makedirs(playlists)
  if not os.path.exists(settings):
    os.makedirs(settings)

sys.path.append(locations.YTUBE_PATH)
sys.path.append(locations.CHAN_PATH)
Exemplo n.º 2
0
from os import path
import sys, os
LIB_PATH = path.join(path.abspath(path.dirname(__file__)), "lib")
sys.path.append(LIB_PATH)
import locations, gitutils, cherrypy

# Do not allow running as root
if os.geteuid() == 0:
    print "BlissFlixx should not be run as superuser."
    print "Please run again but without using sudo."
    sys.exit(1)

# Check if first time run and need to finish install
if not path.exists(locations.YTUBE_PATH):
    cherrypy.log("Finishing Installation. Please wait...")
    gitutils.clone(locations.LIB_PATH, "https://github.com/rg3/youtube-dl.git")

    datapath = locations.DATA_PATH
    playlists = os.path.join(datapath, "playlists")
    settings = os.path.join(datapath, "settings")
    if not os.path.exists(locations.PLUGIN_PATH):
        os.makedirs(locations.PLUGIN_PATH)
    if not os.path.exists(datapath):
        os.makedirs(datapath)
    if not os.path.exists(playlists):
        os.makedirs(playlists)
    if not os.path.exists(settings):
        os.makedirs(settings)

sys.path.append(locations.YTUBE_PATH)
sys.path.append(locations.CHAN_PATH)