Package net.datacrow.fileimporters

Examples of net.datacrow.fileimporters.MusicFile


            if (!tst.exists())
                filename = filename.replaceAll("`", "'");
           
            client.addMessage(DcResources.getText("msgParsing", filename));
           
            MusicFile musicFile = new MusicFile(filename);

            dco.setValue(MusicAlbum._A_TITLE, musicFile.getAlbum());
           
            DcObject artist  = DataManager.createReference(dco, MusicAlbum._F_ARTISTS, musicFile.getArtist());
           
            setValue(child, MusicTrack._K_QUALITY, Long.valueOf(musicFile.getBitrate()));
            setValue(child, MusicTrack._J_PLAYLENGTH, Long.valueOf(musicFile.getLength()));
            setValue(child, MusicTrack._L_ENCODING, musicFile.getEncodingType());
            setValue(child, MusicTrack._A_TITLE, musicFile.getTitle());

            DataManager.createReference(child, MusicTrack._G_ARTIST, artist);
           
            setValue(child, MusicTrack._C_YEAR, musicFile.getYear());
            setValue(child, MusicTrack._F_TRACKNUMBER, Long.valueOf(musicFile.getTrack()));
           
            DataManager.createReference(child, MusicTrack._H_GENRES, musicFile.getGenre());
            updated = true;
        }
       
        return updated;
    }
View Full Code Here

TOP

Related Classes of net.datacrow.fileimporters.MusicFile

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.