org.stanwood.media.cli.importer
Class CLIImportMedia

java.lang.Object
  extended by org.stanwood.media.cli.BaseLauncher
      extended by org.stanwood.media.cli.AbstractLauncher
          extended by org.stanwood.media.cli.importer.CLIImportMedia
All Implemented Interfaces:
ICLICommand

public class CLIImportMedia
extends AbstractLauncher

The mm-import-media command is used import media form watched media directories.

It has the following usage: usage: mm-import-media [-a] [-c ] [-d] [-e] [-h] [-l ] [-t] [-u] [-v] --version, -v Display the version --dontUseDefaults, -d Don't use default media directories. --noupdate, -u If this option is present, then the XBMC addons won''t be updated --deleteNonMedia, -e Delete files are that are not media files (use with care) --test, -t If this option is present, then no changes are performed. --config_file, -c The location of the config file. If not present, attempts to load it from ~/.mediaManager/mediamanager-conf.xml or /etc/mediamanager-conf.xml --actions, -a Execute actions on new media files --log_config, -l The log config mode [||] --help, -h Show the help


Method Summary
protected  java.lang.String getPrintArguments()
           
static void main(java.lang.String[] args)
          The entry point to the application.
protected  boolean processOptions(java.lang.String[] args, org.apache.commons.cli.CommandLine cmd)
          Used to check the CLI options are valid
protected  boolean run()
          This does the actual work of the tool.
protected  java.util.Map<java.io.File,java.util.List<java.io.File>> setupStoresAndActions()
           
 
Methods inherited from class org.stanwood.media.cli.AbstractLauncher
getController, parseLongOption, processOptionsInternal, setConfig
 
Methods inherited from class org.stanwood.media.cli.BaseLauncher
addOption, checkSubCommand, displayHelp, doExit, fatal, fatal, getName, getOptions, getStderr, getStdout, handleBadSubCommandOption, info, init, launch, printOptions, printUsage, shouldDisplayHelp, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.stanwood.media.cli.ICLICommand
getName
 

Method Detail

main

public static void main(java.lang.String[] args)
The entry point to the application. For details see the class documentation.

Parameters:
args - The arguments.

run

protected boolean run()
This does the actual work of the tool.

Specified by:
run in class BaseLauncher
Returns:
true if successful, otherwise false.

setupStoresAndActions

protected java.util.Map<java.io.File,java.util.List<java.io.File>> setupStoresAndActions()
                                                                                  throws ConfigException,
                                                                                         StoreException
Throws:
ConfigException
StoreException

processOptions

protected boolean processOptions(java.lang.String[] args,
                                 org.apache.commons.cli.CommandLine cmd)
Used to check the CLI options are valid

Specified by:
processOptions in class AbstractLauncher
Parameters:
cmd - The CLI options
Returns:
true if valid, otherwise false.

getPrintArguments

protected java.lang.String getPrintArguments()