Package org.farng.mp3.lyrics3

Examples of org.farng.mp3.lyrics3.Lyrics3v2


        // test equals
        body = new FrameBodyTALB((byte) 0, albumTitle);
        frame = new ID3v2_4Frame(body);
        id3v2.setFrame(frame);
        assertEquals(0, mp3.getUnsynchronizedFragments().size());
        lyrics3.setField(new Lyrics3v2Field(frame));
        assertEquals(0, mp3.getUnsynchronizedFragments().size());
        id3v1.setAlbum(albumTitle);
        assertEquals(0, mp3.getUnsynchronizedFragments().size());
        filename.setFrame(frame);
        assertEquals(0, mp3.getUnsynchronizedFragments().size());

        // test differences
        body = new FrameBodyTIT2((byte) 0, "<song title>");
        frame = new ID3v2_4Frame();
        frame.setBody(body);
        filename.setFrame(frame);
        assertEquals(0, mp3.getUnsynchronizedFragments().size());
        id3v1.setTitle("different");
        assertEquals(1, mp3.getUnsynchronizedFragments().size());
        id3v1.setTitle("<song title>");
        assertEquals(0, mp3.getUnsynchronizedFragments().size());
        lyrics3.setField(new Lyrics3v2Field(new FieldBodyETT("different")));
        assertEquals(1, mp3.getUnsynchronizedFragments().size());
        lyrics3.setField(new Lyrics3v2Field(new FieldBodyETT("<song title>")));
        assertEquals(0, mp3.getUnsynchronizedFragments().size());
        body = new FrameBodyTIT2((byte) 0, "different");
        frame = new ID3v2_4Frame(body);
        id3v2.setFrame(frame);
        assertEquals(1, mp3.getUnsynchronizedFragments().size());

        // test two differences
        id3v1.setArtist("<song artist>");
        assertEquals(1, mp3.getUnsynchronizedFragments().size());
        body = new FrameBodyTPE1((byte) 0, "different");
        frame = new ID3v2_4Frame();
        frame.setBody(body);
        filename.setFrame(frame);
        assertEquals(2, mp3.getUnsynchronizedFragments().size());
        body = new FrameBodyTPE1((byte) 0, "<song artist>");
        frame = new ID3v2_4Frame();
        frame.setBody(body);
        filename.setFrame(frame);
        assertEquals(1, mp3.getUnsynchronizedFragments().size());
        lyrics3.setField(new Lyrics3v2Field(new FieldBodyEAR("different")));
        assertEquals(2, mp3.getUnsynchronizedFragments().size());
        lyrics3.setField(new Lyrics3v2Field(new FieldBodyEAR("<song artist>")));
        assertEquals(1, mp3.getUnsynchronizedFragments().size());
        body = new FrameBodyTPE1((byte) 0, "different");
        frame = new ID3v2_4Frame(body);
        id3v2.setFrame(frame);
        assertEquals(2, mp3.getUnsynchronizedFragments().size());
View Full Code Here


        frameBody = new FrameBodyTALB((byte) 0, albumTitle);
        frame = new ID3v2_4Frame(frameBody);
        id3v2.setFrame(frame);

        // setup lyrics3v2
        Lyrics3v2Field field;
        AbstractLyrics3v2FieldBody fieldBody;
        fieldBody = new FieldBodyEAL(albumTitle);
        field = new Lyrics3v2Field(fieldBody);
        lyrics3.setField(field);

        // setup filename tag
        frameBody = new FrameBodyTALB((byte) 0, albumTitle);
        frame = new ID3v2_4Frame(frameBody);
View Full Code Here

                    lyric = new Lyrics3v2((Lyrics3v2) mp3tag);
                } else {
                    lyric = new Lyrics3v2(mp3tag);
                }
                final Iterator iterator = lyric.iterator();
                Lyrics3v2Field field;
                ID3v2_4Frame newFrame;
                while (iterator.hasNext()) {
                    try {
                        field = (Lyrics3v2Field) iterator.next();
                        newFrame = new ID3v2_4Frame(field);
View Full Code Here

    public FieldBodyLYR(final FieldBodyLYR copyObject) {
        super(copyObject);
        ObjectLyrics3Line oldObject;
        for (int i = 0; i < copyObject.lines.size(); i++) {
            oldObject = (ObjectLyrics3Line) copyObject.lines.get(i);
            AbstractMP3Object newObject = new ObjectLyrics3Line(oldObject);
            this.lines.add(newObject);
//            appendToObjectList(newObject);
        }
    }
View Full Code Here

      AbstractID3v2Frame frame = (AbstractID3v2Frame) it.next();
      String name = frame.getIdentifier().trim();
      if (!name.equals("APIC")) {
        Iterator itBody = frame.getBody().iterator();
        while (itBody.hasNext()) {
          AbstractMP3Object mp3Obj = (AbstractMP3Object) itBody.next();
          String bodyName = mp3Obj.getIdentifier();
          if (!bodyName.equals("Picture data")) {
            String bodyValue = mp3Obj.getValue().toString();
            metadataCollector.notifyProperty(name + "-" + bodyName, bodyValue);
          }
        }
      }
    }
View Full Code Here

      AbstractID3v2Frame frame = (AbstractID3v2Frame) it.next();
      String name = frame.getIdentifier().trim();
      if (!name.equals("APIC")) {
        Iterator itBody = frame.getBody().iterator();
        while (itBody.hasNext()) {
          AbstractMP3Object mp3Obj = (AbstractMP3Object) itBody.next();
          String bodyName = mp3Obj.getIdentifier();
          if (!bodyName.equals("Picture data")) {
            String bodyValue = mp3Obj.getValue().toString();
            metadataCollector.notifyProperty(name + "-" + bodyName, bodyValue);
          }
        }
      }
    }
View Full Code Here

      AbstractID3v2Frame frame = (AbstractID3v2Frame) it.next();
      String name = frame.getIdentifier().trim();
      if (!name.equals("APIC")) {
        Iterator itBody = frame.getBody().iterator();
        while (itBody.hasNext()) {
          AbstractMP3Object mp3Obj = (AbstractMP3Object) itBody.next();
          String bodyName = mp3Obj.getIdentifier();
          if (!bodyName.equals("Picture data")) {
            String bodyValue = mp3Obj.getValue().toString();
            metadataCollector.notifyProperty(name + "-" + bodyName, bodyValue);
          }
        }
      }
    }
View Full Code Here

      AbstractID3v2Frame frame = (AbstractID3v2Frame) it.next();
      String name = frame.getIdentifier().trim();
      if (!name.equals("APIC")) {
        Iterator itBody = frame.getBody().iterator();
        while (itBody.hasNext()) {
          AbstractMP3Object mp3Obj = (AbstractMP3Object) itBody
          .next();
          String bodyName = mp3Obj.getIdentifier();
          if (!bodyName.equals("Picture data")) {
            String bodyValue = mp3Obj.getValue().toString();
            metadataCollector.notifyProperty(name + "-" + bodyName,
                bodyValue);
          }
        }
      }
View Full Code Here

      AbstractID3v2Frame frame = (AbstractID3v2Frame) it.next();
      String name = frame.getIdentifier().trim();
      if (!name.equals("APIC")) {
        Iterator itBody = frame.getBody().iterator();
        while (itBody.hasNext()) {
          AbstractMP3Object mp3Obj = (AbstractMP3Object) itBody.next();
          String bodyName = mp3Obj.getIdentifier();
          if (!bodyName.equals("Picture data")) {
            String bodyValue = mp3Obj.getValue().toString();
            metadataCollector.notifyProperty(name + "-" + bodyName, bodyValue);
          }
        }
      }
    }
View Full Code Here

     */
    protected AbstractMP3FragmentBody(final AbstractMP3FragmentBody copyObject) {
        super(copyObject);
        final Iterator iterator = copyObject.iterator();
        while (iterator.hasNext()) {
            final AbstractMP3Object oldObject = (AbstractMP3Object) iterator.next();
            final AbstractMP3Object newObject = (AbstractMP3Object) TagUtility.copyObject(oldObject);
            objectList.add(newObject);
        }
    }
View Full Code Here

TOP

Related Classes of org.farng.mp3.lyrics3.Lyrics3v2

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.