示例#1
0
  private void scanMediathek(File f) throws IOException {
    File fMc = otrConfig.getDir(OtrConfig.Dir.MC);
    File fMcXmlLib = otrConfig.getFile(OtrConfig.fileMcXmlLib);
    File fTmp = new File("/tmp");
    logger.info("Scanning for MP4 in " + f.getAbsolutePath());
    logger.info(" ... saving to : " + fMcXmlLib.getAbsolutePath());

    McLibraryTagger tagger = new McLibraryTagger(fTmp, null);
    tagger.scan(fMc);
    tagger.saveToXml(fMcXmlLib);
  }
示例#2
0
  public void parseArguments(String args[]) throws Exception {
    createOptions();
    CommandLineParser parser = new DefaultParser();
    CommandLine cmd = parser.parse(uOption.getOptions(), args);

    uOption.handleHelp(cmd);
    uOption.handleLogger(cmd);

    otrConfig.readConfig(uOption.initConfig(cmd, OtrCastBootstrap.xmlConfig));
    otrConfig.checkMcSettings();

    if (cmd.hasOption(oScan.getOpt()) && uOption.allowAppStart()) {
      scanMediathek(otrConfig.getDir(OtrConfig.Dir.MC));
    }

    if (!uOption.isAppStarted()) {
      uOption.help();
    }
  }