Package org.farng.mp3.object

Examples of org.farng.mp3.object.ObjectBooleanString


        montarGeneros();
        jTextField_Interp.setCrepzBuscador(this);
        jTextField_Album.setCrepzBuscador(this);

        try {
            mp3File = new MP3File(musica.getCaminho());
            setDadosv2();
        } catch (IOException ex) {
            throw new Exception("-Erro ao Carregar Propriedades do arquivo " + musica.getNome() + " \n", ex);
        } catch (TagException ex) {
            throw new Exception("-Erro ao Carregar Propriedades do arquivo " + mp3File.getMp3file().getName() + " \n", ex);
View Full Code Here


                String caminho = file.getAbsolutePath().trim().replace('\\', '/');
                if (listaNegra.contains(caminho)) {
                    System.out.println("Não importado, pois está na lista temporária de regeição: " + caminho);
                    return null;
                }
                MP3File mp3;
                try {
                    mp3 = new MP3File(caminho);
                    MusicaS musica = getMusica(mp3, file);
                    if (organizarPastas) {
                        File destinoF = new File(destino);
                        destinoF.mkdirs();
                        destinoF = new File(destinoF.getAbsolutePath() + "/" + file.getName());
                        if (!destinoF.getAbsolutePath().equals(file.getAbsolutePath())) {
                            if (file.renameTo(destinoF)) {
                                file = destinoF;
                            }
                            caminho = file.getAbsolutePath().replace('\\', '/');
                            mp3 = new MP3File(caminho);
                            musica = getMusica(mp3, file);
                        }

                    }
                    if (musica != null) {
View Full Code Here

    try {
      tmp = File.createTempFile("nutch", ".mp3");
      FileOutputStream fos = new FileOutputStream(tmp);
      fos.write(raw);
      fos.close();
      MP3File mp3 = new MP3File(tmp);

      if (mp3.hasID3v2Tag()) {
        parse = getID3v2Parse(mp3, content.getMetadata());
      } else if (mp3.hasID3v1Tag()) {
        parse = getID3v1Parse(mp3, content.getMetadata());
      } else {
        return new ParseStatus(ParseStatus.FAILED,
                               ParseStatus.FAILED_MISSING_CONTENT,
                               "No textual content available").getEmptyParse(conf);
View Full Code Here

    try {
      tmp = File.createTempFile("nutch", ".mp3");
      FileOutputStream fos = new FileOutputStream(tmp);
      fos.write(raw);
      fos.close();
      MP3File mp3 = new MP3File(tmp);

      if (mp3.hasID3v2Tag()) {
        parse = getID3v2Parse(mp3);
      } else if (mp3.hasID3v1Tag()) {
        parse = getID3v1Parse(mp3);
      } else {
        throw new ParseException("No textual content available");
      }
View Full Code Here

    try {
      tmp = File.createTempFile("nutch", ".mp3");
      FileOutputStream fos = new FileOutputStream(tmp);
      fos.write(raw);
      fos.close();
      MP3File mp3 = new MP3File(tmp);

      if (mp3.hasID3v2Tag()) {
        parse = getID3v2Parse(mp3);
      } else if (mp3.hasID3v1Tag()) {
        parse = getID3v1Parse(mp3);
      } else {
        throw new ParseException("No textual content available");
      }
View Full Code Here

    try {
      tmp = File.createTempFile("nutch", ".mp3");
      FileOutputStream fos = new FileOutputStream(tmp);
      fos.write(raw);
      fos.close();
      MP3File mp3 = new MP3File(tmp);

      if (mp3.hasID3v2Tag()) {
        parse = getID3v2Parse(mp3, content.getMetadata(), content);
      } else if (mp3.hasID3v1Tag()) {
        parse = getID3v1Parse(mp3, content.getMetadata(), content);
      } else {
        return new ParseStatus().getEmptyParseResult(content.getUrl(),
            getConf());
      }
View Full Code Here

   */
  public SongData( String path ) throws SongDataException {
    this.path = tagPrep(path);
    AbstractMP3Tag tag = null;
        try {
      MP3File mp3file = new MP3File(path);
      if (mp3file.hasID3v2Tag()) {
        tag = mp3file.getID3v2Tag();
      } else if (mp3file.hasID3v1Tag()) {
        tag = mp3file.getID3v1Tag();
      } else {
        throw new SongDataException( "No MP3 ID tag found for \""+path+"\"" );
      }
        } catch (TagException tE) {
            throw new SongDataException( "(TagException) Broken MP3 ID tag found for \""+path+"\"" );
View Full Code Here

    try {
      tmp = File.createTempFile("nutch", ".mp3");
      FileOutputStream fos = new FileOutputStream(tmp);
      fos.write(raw);
      fos.close();
      MP3File mp3 = new MP3File(tmp);

      if (mp3.hasID3v2Tag()) {
        parse = getID3v2Parse(mp3, content.getMetadata());
      } else if (mp3.hasID3v1Tag()) {
        parse = getID3v1Parse(mp3, content.getMetadata());
      } else {
        return new ParseStatus(ParseStatus.FAILED,
                               ParseStatus.FAILED_MISSING_CONTENT,
                               "No textual content available").getEmptyParse(conf);
View Full Code Here

            AbstractID3v2FrameBody frameBody;
            frameBody = new FrameBodyCOMM((byte) 0, "eng", comment, comment);
            frame = new ID3v2_3Frame(frameBody);
            id3v2.setFrame(frame);

            MP3File mp3File = new MP3File(file);
            TagOptionSingleton.getInstance().setDefaultSaveMode(TagConstant.MP3_FILE_SAVE_OVERWRITE);
            mp3File.setID3v1Tag(id3v1);
            mp3File.setID3v2Tag(id3v2);
            mp3File.save();
            // very dirty, TODO: prevent Jid3lib to generate the ".original" files
            File originalFile = new File(FilenameUtils.removeExtension(file.toString()) + ".original.mp3");
            if(originalFile.exists())
                originalFile.delete();
        } catch (TagException ex) {
View Full Code Here

        int size;
        final String str;
        final Iterator iterator;
        ID3v2_4Frame frame;
        final byte[] buffer = new byte[6];
        final MP3File mp3 = new MP3File();
        mp3.seekMP3Frame(file);
        final long mp3start = file.getFilePointer();
        file.seek(0);
        str = "ID3";
        for (int i = 0; i < str.length(); i++) {
            buffer[i] = (byte) str.charAt(i);
View Full Code Here

TOP

Related Classes of org.farng.mp3.object.ObjectBooleanString

Copyright © 2018 www.massapicom. 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.