Merge branch '1.9.1' into devel
Conflicts: VERSION airtime_mvc/application/configs/constants.php airtime_mvc/application/controllers/ScheduleController.php install_minimal/airtime-install install_minimal/include/AirtimeInstall.php install_minimal/include/airtime-upgrade.php python_apps/api_clients/api_client.py python_apps/pypo/pypofetch.py python_apps/pypo/pypopush.py
This commit is contained in:
commit
9c7bab616d
50 changed files with 205 additions and 125 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
|
||||
. ${virtualenv_bin}activate
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#!/usr/local/bin/python
|
||||
import sys
|
||||
import os
|
||||
import logging
|
||||
|
@ -85,8 +84,10 @@ def checkOtherOption(args):
|
|||
def errorIfMultipleOption(args, msg=''):
|
||||
if(checkOtherOption(args)):
|
||||
if(msg != ''):
|
||||
printHelp()
|
||||
raise OptionValueError(msg)
|
||||
else:
|
||||
printHelp()
|
||||
raise OptionValueError("This option cannot be combined with other options")
|
||||
|
||||
def printHelp():
|
||||
|
@ -121,6 +122,9 @@ There are two ways to import audio files into Airtime:
|
|||
|
||||
def CopyAction(option, opt, value, parser):
|
||||
errorIfMultipleOption(parser.rargs)
|
||||
if(len(parser.rargs) == 0 ):
|
||||
printHelp()
|
||||
raise OptionValueError("No argument found. This option requires at least one argument.")
|
||||
stor = helper_get_stor_dir()
|
||||
if(stor is None):
|
||||
exit("Unable to connect to the Airtime server.")
|
||||
|
@ -129,6 +133,9 @@ def CopyAction(option, opt, value, parser):
|
|||
|
||||
def MoveAction(option, opt, value, parser):
|
||||
errorIfMultipleOption(parser.rargs)
|
||||
if(len(parser.rargs) == 0 ):
|
||||
printHelp()
|
||||
raise OptionValueError("No argument found. This option requires at least one argument.")
|
||||
stor = helper_get_stor_dir()
|
||||
if(stor is None):
|
||||
exit("Unable to connect to the Airtime server.")
|
||||
|
@ -138,8 +145,10 @@ def MoveAction(option, opt, value, parser):
|
|||
def WatchAddAction(option, opt, value, parser):
|
||||
errorIfMultipleOption(parser.rargs)
|
||||
if(len(parser.rargs) > 1):
|
||||
printHelp()
|
||||
raise OptionValueError("Too many arguments. This option requires exactly one argument.")
|
||||
elif(len(parser.rargs) == 0 ):
|
||||
printHelp()
|
||||
raise OptionValueError("No argument found. This option requires exactly one argument.")
|
||||
path = parser.rargs[0]
|
||||
if (path[0] == "/" or path[0] == "~"):
|
||||
|
@ -162,6 +171,7 @@ def WatchAddAction(option, opt, value, parser):
|
|||
def WatchListAction(option, opt, value, parser):
|
||||
errorIfMultipleOption(parser.rargs)
|
||||
if(len(parser.rargs) > 0):
|
||||
printHelp()
|
||||
raise OptionValueError("This option doesn't take any arguments.")
|
||||
res = api_client.list_all_watched_dirs()
|
||||
if(res is None):
|
||||
|
@ -178,8 +188,10 @@ def WatchListAction(option, opt, value, parser):
|
|||
def WatchRemoveAction(option, opt, value, parser):
|
||||
errorIfMultipleOption(parser.rargs)
|
||||
if(len(parser.rargs) > 1):
|
||||
printHelp()
|
||||
raise OptionValueError("Too many arguments. This option requires exactly one argument.")
|
||||
elif(len(parser.rargs) == 0 ):
|
||||
printHelp()
|
||||
raise OptionValueError("No argument found. This option requires exactly one argument.")
|
||||
path = parser.rargs[0]
|
||||
if (path[0] == "/" or path[0] == "~"):
|
||||
|
@ -222,8 +234,10 @@ def StorageSetAction(option, opt, value, parser):
|
|||
sys.exit(1)
|
||||
|
||||
if(len(parser.rargs) > 1):
|
||||
printHelp()
|
||||
raise OptionValueError("Too many arguments. This option requires exactly one argument.")
|
||||
elif(len(parser.rargs) == 0 ):
|
||||
printHelp()
|
||||
raise OptionValueError("No argument found. This option requires exactly one argument.")
|
||||
|
||||
path = parser.rargs[0]
|
||||
|
@ -247,6 +261,7 @@ def StorageSetAction(option, opt, value, parser):
|
|||
def StorageGetAction(option, opt, value, parser):
|
||||
errorIfMultipleOption(parser.rargs)
|
||||
if(len(parser.rargs) > 0):
|
||||
printHelp()
|
||||
raise OptionValueError("This option does not take any arguments.")
|
||||
print helper_get_stor_dir()
|
||||
|
||||
|
@ -275,7 +290,7 @@ if('-l' in sys.argv or '--link' in sys.argv):
|
|||
if('-h' in sys.argv):
|
||||
printHelp()
|
||||
sys.exit()
|
||||
if(len(sys.argv) == 1):
|
||||
if(len(sys.argv) == 1 or '-' not in sys.argv[1]):
|
||||
printHelp()
|
||||
sys.exit()
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
$values = parse_ini_file('/etc/airtime/airtime.conf', true);
|
||||
|
||||
|
|
0
utils/rivendell-converter.sh
Normal file → Executable file
0
utils/rivendell-converter.sh
Normal file → Executable file
0
utils/serbianLatinToCyrillicConverter.py
Executable file → Normal file
0
utils/serbianLatinToCyrillicConverter.py
Executable file → Normal file
Loading…
Add table
Add a link
Reference in a new issue