Пример #1
0
 /**
  * Completes all {@link DvdTitle} by reading the appropriate VTS file.
  *
  * @param dvdDir Mount directory of the DVD
  * @param vtsn VTS number
  * @param vtsnTitles {@link DvdTitle} belonging to this VTS file. When this method returns, the
  *     {@link DvdTitle} will contain detailed data unless the respective IFO/BUP files were
  *     invalid.
  */
 private void completeTitles(File dvdDir, int vtsn, List<DvdTitle> vtsnTitles) throws IOException {
   try {
     try {
       LOG.info("Reading VTS_%02d_0.IFO", vtsn);
       readVtsFile(vtsnTitles, dvdDir, String.format("VIDEO_TS/VTS_%02d_0.IFO", vtsn));
     } catch (IfoException | EOFException ex) {
       try {
         LOG.warn("Failed to read VTS IFO file: %s", ex.getMessage());
         LOG.info("Reading VTS_%02d_0.BUP", vtsn);
         readVtsFile(vtsnTitles, dvdDir, String.format("VIDEO_TS/VTS_%02d_0.BUP", vtsn));
       } catch (IfoException | EOFException ex2) {
         LOG.warn("VTS file for vtsn %d is invalid: %s", vtsn, ex.getMessage());
       }
     }
     LOG.debug("Reading VTS_%02d_0 completed successfully...", vtsn);
   } catch (FileNotFoundException ex) {
     LOG.warn("Found no VTS file for vtsn %d, ignoring!", vtsn);
   }
 }