public Collection<Podcast> getPodcasts() { return copy(podcasts); }
Collection<Artwork> artwork = l.getArtwork(); Collection<Track> tracks = l.getTracks();
public static void main(String[] args) throws IOException, ItlException { if (args.length != 1) { System.err.println("Usage: ExportRatings <library.itl>"); System.exit(5); } Library lib = ParseLibrary.parse(new File(args[0])); for (Track t : lib.getTracks()) { if(t.getLocation() != null) { System.out.println(t.getLocation() + "," + t.getRating()); } } } }
public File get(Library l, ArtworkFile.Directory type, byte[] artId) { if (artId == null) { return null; } ArtworkFile af = new ArtworkFile(type, artId, 2); String f = af.toString(l.getLibraryPersistentId()); // ArtworkFile af1 = new ArtworkFile(type, artId, 1); // // String f1 = af1.toString(l.getLibraryPersistentId()); // // if (getNames().contains(f1)) { // f = f1; // } else { // f = null; // return null; // } used.add(f); return new File(dir, f); } }
public static Library parse(InputStream in, long fileLength) throws IOException, ItlException { Input di = new InputImpl(in); Hdfm hdr = Hdfm.read(di, fileLength); ParseLibrary pl = new ParseLibrary(); String path = pl.drain(inputFor(hdr.fileData), hdr.fileData.length); // for (InputRange ir : pl.diagnostics) { // System.out.println(ir); // } Library library = new Library(hdr, path, pl.playlists, pl.podcasts, pl.tracks, pl.resourcesWithArtwork); return library; }
for (Track t : lib.getTracks()) {
public Collection<Artwork> getArtwork() { return copy(artwork); } }
public Collection<Playlist> getPlaylists() { return copy(playlists); }
public Collection<Track> getTracks() { return copy(tracks); }