@Override public boolean loadInfo(FileSource fs) { tagMap = PSFFile.getTags(fs.getData(), (int) fs.getLength()); if (tagMap == null) { return false; } infoMap.put(INFO_TITLE, tagMap.get("title")); infoMap.put(INFO_GAME, tagMap.get("game")); infoMap.put(INFO_COPYRIGHT, tagMap.get("copyright")); infoMap.put(INFO_LENGTH, tagMap.get("length")); infoMap.put(INFO_AUTHOR, tagMap.get("artist")); infoMap.put(INFO_YEAR, tagMap.get("year")); return true; }
@Override public boolean load(FileSource fs) { tagMap = PSFFile.getTags(fs.getData(), (int) fs.getLength()); if (tagMap == null) { return false; } String libName = tagMap.get("_lib"); FileSource lib_fs = null; if (libName != null) { lib_fs = fs.getRelative(libName); lib_fs.getFile(); lib_fs.close(); } songRef = N_load(fs.getFile().getPath()); return (songRef != 0); }