Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/dvdrip master
authorMark Wooding <mdw@distorted.org.uk>
Tue, 22 Mar 2022 21:38:19 +0000 (21:38 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 22 Mar 2022 21:38:19 +0000 (21:38 +0000)
* 'master' of git.distorted.org.uk:~mdw/publish/public-git/dvdrip:
  dvd-info.c: Trigger the easy lookup if explicit chapter bounds aren't given.
  dvd-info.c: Don't forget to dump the last titleset.
  dvd-info.c: Add missing `\' in output banner.

1  2 
dvd-info.c

diff --combined dvd-info.c
@@@ -167,7 -167,7 +167,7 @@@ int main(int argc, char *argv[]
    if (f&f_bogus) { usage(stderr); exit(2); }
    setlocale(LC_ALL, "");
    progress_init(&progress);
 -  dvdfn = argv[optind]; open_dvd(dvdfn, 0, &dvd);
 +  dvdfn = argv[optind]; open_dvd(dvdfn, O_RDONLY, 0, &dvd);
    vmgi = ifoOpenVMGI(dvd);
    if (!vmgi) bail("failed to open vmgi for `%s'", dvdfn);
  
      } else if (STRCMP(p, ==, "dumpall")) {
        if (f&f_any) { fputc('\n', stdout); f &= ~f_any; }
        printf(";;;--------------------------------------------------------------------------\n"
-            ";;; Video management infon\n");
+            ";;; Video management info\n\n");
        ifo_print(dvd, 0);
-       for (j = 1; j < vmgi->vmgi_mat->vmg_nr_of_title_sets; j++) {
+       for (j = 1; j <= vmgi->vmgi_mat->vmg_nr_of_title_sets; j++) {
        printf("\n"
               ";;;--------------------------------------------------------------------------\n"
               ";;; Video titleset %d info\n\n", j);
                     "title number");
        nch = nchapters(ti);
        if (*p != '.') {
-       loch = 1; hich = nch;
+       loch = 1; hich = -1;
        } else {
        p++; loch = parse_int(&p, PNF_JUNK, 1, nch, "low chapter");
        if (*p != '-')
          hich = loch;
        else {
          p++;
-         if (!*p) hich = nch;
+         if (!*p) hich = -1;
          else hich = parse_int(&p, PNF_JUNK, loch, nch, "high chapter");
        }
        }