Examples of NzbParser


Examples of me.mabra.hellonzb.parser.NzbParser

          {
            if(dataString.substring(0, 3).equals("NZB"))
            {
              // new NZB file to load
              final String filename = dataString.substring(4, dataString.length());
              final NzbParser parser = new NzbParser(filename, mainApp.getPrefValue("GeneralSettingsDownloadDir"));
              logger.msg("Loading new NZB file from external instance: " + filename, MyLogger.SEV_INFO);
              EventQueue.invokeLater(new Runnable()
              {
                public void run()
                {
View Full Code Here

Examples of me.mabra.hellonzb.parser.NzbParser

        String filename = file.getCanonicalPath();
        if(!filename.substring(filename.length() - 4, filename.length()).equalsIgnoreCase(".nzb"))
          continue;
       
        // yes, so add it to the download queue
        final NzbParser newParser = new NzbParser(file.getAbsolutePath(), mainApp.getPrefValue("GeneralSettingsDownloadDir"));
        logger.msg("Loading new NZB file from auto-load directory: " + filename, MyLogger.SEV_INFO);
        EventQueue.invokeLater(new Runnable()
        {
          public void run()
          {
View Full Code Here

Examples of me.mabra.hellonzb.parser.NzbParser

  {
    if(selectedRows.length == 0)
      return;

    // now move row(s) and compare first row before and after operation
    NzbParser pBefore = nzbFileQueueTabModel.getNzbParser(0);
    nzbFileQueueTabModel.moveRows(selectedRows, direction);
    NzbParser pAfter = nzbFileQueueTabModel.getNzbParser(0);
    if(pBefore != pAfter)
      nzbQueueReordered(pAfter);
  }
View Full Code Here

Examples of me.mabra.hellonzb.parser.NzbParser

  protected void loadNextNzbFile()
  {
    if(nzbFileQueueTabModel.getRowCount() > 0)
    {
      // start to download first file of the next nzb file in queue
      NzbParser parser = nzbFileQueueTabModel.getNzbParser(0);
      if(parser != null)
      {
        filesToDownloadTabModel.addNzbParserContents(parser);
        currentNzbParser = parser;
      }
View Full Code Here

Examples of me.mabra.hellonzb.parser.NzbParser

       
        // tmp. rename original source file
        tmpFile = new File(datadirPath + filename);
        file.renameTo(tmpFile);
       
        NzbParser parser = new NzbParser(tmpFile.getAbsolutePath(), getPrefValue("GeneralSettingsDownloadDir"));
        addNzbToQueue(parser);
        logger.msg("Loaded new NZB file from last session: " + parser.getName(), MyLogger.SEV_INFO);
      }
      catch(Exception e)
      {
        logger.printStackTrace(e);
      }
View Full Code Here

Examples of me.mabra.hellonzb.parser.NzbParser

    taskMgr.loadNzb(true);

    try
    {
      File file = new File(filename);
      addNzbToQueue(new NzbParser(filename, getPrefValue("GeneralSettingsDownloadDir")));
      if(getBooleanPrefValue("GeneralSettingsDelNzbAfterLoading"))
        file.delete();
    }
    catch(IOException e)
    {
View Full Code Here

Examples of me.mabra.hellonzb.parser.NzbParser

      if(!currId.equals(id.toString()))
        throw new InvalidDataFormatException("corrupt or missing data (id missmatch " + currId + " != " + id.toString() + ")");

      // data ok, create new NzbParser for main app
      nzbParser = new NzbParser(writeToTmpFile(), null);
    }
    else
    {
      // new data line
      currData += line;
View Full Code Here

Examples of me.mabra.hellonzb.parser.NzbParser

    {
      WebUploadParser parser = new WebUploadParser(content.toString(CharsetUtil.UTF_8));
      try
      {
        parser.parse();
        NzbParser nzbParser = parser.getNzbParser();
        AppConnector._instance()._addNzbToQueue(nzbParser);

        parentHandler.redirect(e, "upload.py?upload=ok");
      }
      catch(InvalidDataFormatException ex)
View Full Code Here

Examples of me.mabra.hellonzb.parser.NzbParser

          if(!file.canRead())
            continue;
         
          try
          {
            mainApp.addNzbToQueue(new NzbParser(file.getAbsolutePath(), mainApp.getPrefValue("GeneralSettingsDownloadDir")));
          }
          catch(XMLStreamException e)
          {
            String msg = mainApp.getLocaler().getBundleText("PopupXMLParserError");
            String title = mainApp.getLocaler().getBundleText("PopupErrorTitle");
View Full Code Here

Examples of me.mabra.hellonzb.parser.NzbParser

        case DOWN:    tableData.remove(oldRow);    break;
        case BOTTOM:  tableData.remove(oldRow);    break;
      }
     
      // move content (NzbParser)
      NzbParser parser = nzbFileQueue.get(oldRow);
      nzbFileQueue.insertElementAt(parser, newRow);
      switch(direction)
      {
        case TOP:    nzbFileQueue.remove(oldRow + 1)break;
        case UP:    nzbFileQueue.remove(oldRow + 1)break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.