$totaldiscs || $start < 0) $start = $totaldiscs - $count; fseek($fp, 57 * $start, SEEK_SET); $n = $count; while($line=fgets($fp)) { $name = trim($line); if (file_exists($name)) $lines[]=$name; if (--$n <= 0) break; } fclose($fp); printf("
| Artist | Album | Disc Id | CTDB Id | $imgs = ''; if ($lines) foreach(array_reverse($lines) as $line) { $ctdb = new phpCTDB($line); $disc = $ctdb->db['discs'][0]; $ctdb->ParseToc(); //$id = @$disc['MBID']['value']; $artist = @$disc['ART ']['value']; $title = @$disc['nam ']['value']; $discid = substr($line,13,30); $ctdbid = $ctdb->db['discs'][0]['CRC ']['int']; if ($artist == "" && $title == "") { //$q = new MusicBrainzQuery(new WebService('db4.cuetools.net')); $q = new MusicBrainzQuery(); $rf = new ReleaseFilter(); try { $rresults = $q->getReleases( $rf->discId($ctdb->mbid) ); foreach ( $rresults as $key => $rr ) { $rr = $rr->getRelease(); $artist = $rr->getArtist()->getName(); $title = $rr->getTitle(); $imgs = $imgs . ' |
|---|---|---|---|
| %s | %s | %s | %08x |
| More | |||