Ticket #46840: fix_cddb_hidden_tracks.patch
File fix_cddb_hidden_tracks.patch, 1.3 KB (added by RJVB (René Bertin), 10 years ago) |
---|
-
src/io.c
old new 2665 2665 g_error("Unexpected output in cdda2wav toc-output\n"); 2666 2666 } 2667 2667 trackinfo[tocnr]->track_nr = atoi(p1); 2668 if (trackinfo[tocnr]->track_nr == 0) 2669 cdinfo.nr_tracks++; 2668 2670 trackinfo[tocnr]->isosize = -1; 2669 2671 2670 2672 /* reststring into tmp2 - strip to remove leading spaces */ … … 8401 8403 if (extract_quoted(tmp) != 0) 8402 8404 return; 8403 8405 8406 if (matchnr == 0 && trackinfo[matchnr]->track_nr == 0) 8407 matchnr++; 8408 8404 8409 if (mode == 0) { 8405 8410 if (matchnr >= cdinfo.nr_tracks) { 8406 8411 g_warning("invalid track count from cddb-server\n"); … … 8482 8487 8483 8488 /* build of command line */ 8484 8489 if (mode == 0 || mode == 2) { 8490 gint ntr = cdinfo.nr_tracks; 8491 8492 if (ntr > 0 && trackinfo[0]->track_nr == 0) 8493 ntr--; 8485 8494 g_snprintf(tmp,MAXLINE,"cddb query %s %d ", 8486 cdinfo.cddb_discid, cdinfo.nr_tracks);8495 cdinfo.cddb_discid, ntr); 8487 8496 for (i = 0; i < cdinfo.nr_tracks; i++) { 8497 if (trackinfo[i]->track_nr == 0) 8498 continue; 8488 8499 g_snprintf(tmp2,MAXLINE,"%d ", 8489 8500 trackinfo[i]->start_sec + 150); 8490 8501 strcat(tmp,tmp2); 8491 8502 } 8492 g_snprintf(tmp2,MAXLINE,"%d", cdinfo.total_size/ 75);8503 g_snprintf(tmp2,MAXLINE,"%d",(cdinfo.leadout + 150) / 75); 8493 8504 strcat(tmp,tmp2); 8494 8505 } else { 8495 8506 /* get data from toc file */