Package org.jaudiotagger.tag

Examples of org.jaudiotagger.tag.Tag


            if (null == mime) {
              return FileVisitResult.CONTINUE;
            }
            if (mime.startsWith("audio/")) {
              AudioFile af = AudioFileIO.read(path.toFile());
              Tag tag = af.getTag();
              //System.out.println("###### Lied: "+path);
              // default-werte, falls tags unvollständig.
              String artist = "NULL";
              String album = "NULL";
              String title = "NULL";
              String track = "NULL";
              String genre = "NULL";
              try {
                track = (tag.getFirst(FieldKey.TRACK));
                if ("0".equals(track)) { //falls eingetragener track 0 ist, als null übernehmen
                  track = "NULL";
                }
              } catch (NullPointerException e) {/*e.printStackTrace();*/}
              try {
                artist = tag.getFirst(FieldKey.ARTIST);
              } catch (NullPointerException e) {/*e.printStackTrace();*/}
              try {
                album = tag.getFirst(FieldKey.ALBUM);
              } catch (NullPointerException e) {/*e.printStackTrace()*/;}
              try {
                title = tag.getFirst(FieldKey.TITLE);
              } catch (NullPointerException e) {/*e.printStackTrace()*/;}
              try {
                genre = tag.getFirst(FieldKey.GENRE);
              } catch (NullPointerException e) {/*e.printStackTrace()*/;}
//              System.out.println("MIME: "+mime);
//              System.out.println("Track: "+track);
//              System.out.println("Artist: "+artist);
//              System.out.println("Album: "+album);
View Full Code Here

TOP

Related Classes of org.jaudiotagger.tag.Tag

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.