diff --git a/cd/cd_dump.ixx b/cd/cd_dump.ixx index a9cc3ec..83ef51c 100644 --- a/cd/cd_dump.ixx +++ b/cd/cd_dump.ixx @@ -410,9 +410,12 @@ export bool redumper_dump_cd(Context &ctx, const Options &options, bool refine) // compare disc / file TOC to make sure it's the same disc if(refine) { - std::vector toc_buffer_file = read_vector(toc_path); - if(toc_buffer != toc_buffer_file) - throw_line("disc / file TOC don't match, refining from a different disc?"); + if(!options.force_refine) + { + std::vector toc_buffer_file = read_vector(toc_path); + if(toc_buffer != toc_buffer_file) + throw_line("disc / file TOC don't match, refining from a different disc?"); + } } // store TOC else diff --git a/cd/cd_dump_new.ixx b/cd/cd_dump_new.ixx index 9d09a3b..06f9b1d 100644 --- a/cd/cd_dump_new.ixx +++ b/cd/cd_dump_new.ixx @@ -96,7 +96,7 @@ TOC toc_process(Context &ctx, const Options &options, bool store) write_vector(cdtext_path, cd_text_buffer); } // compare disc / file TOC to make sure it's the same disc - else + else if(!options.force_refine) { std::vector toc_buffer_file = read_vector(toc_path); if(toc_buffer != toc_buffer_file) diff --git a/dvd/dvd_dump.ixx b/dvd/dvd_dump.ixx index 621f330..af29b73 100644 --- a/dvd/dvd_dump.ixx +++ b/dvd/dvd_dump.ixx @@ -541,7 +541,7 @@ export bool redumper_dump_dvd(Context &ctx, const Options &options, DumpMode dum } } // compare physical structures to stored to make sure it's the same disc - else + else if(!options.force_refine) { for(uint32_t i = 0; i < physical_structures.size(); ++i) { diff --git a/options.ixx b/options.ixx index a7ace55..dc44dcd 100644 --- a/options.ixx +++ b/options.ixx @@ -63,6 +63,7 @@ export struct Options int dump_read_size; bool overread_leadout; bool force_unscrambled; + bool force_refine; Options(int argc, const char *argv[]) @@ -90,6 +91,7 @@ export struct Options , dump_read_size(32) , overread_leadout(false) , force_unscrambled(false) + , force_refine(false) { for(int i = 1; i < argc; ++i) arguments += str_quoted_if_space(argv[i]) + " "; @@ -232,6 +234,8 @@ export struct Options overread_leadout = true; else if(key == "--force-unscrambled") force_unscrambled = true; + else if(key == "--force-refine") + force_refine = true; // unknown option else { @@ -334,6 +338,7 @@ export struct Options LOG("\t--dump-read-size=VALUE \tnumber of sectors to read at once on initial dump, DVD only (default: {})", dump_read_size); LOG("\t--overread-leadout \tdo not limit lead-out to the first hundred sectors, read until drive returns SCSI error"); LOG("\t--force-unscrambled \tdo not attempt to read data sectors as audio (BE read method only)"); + LOG("\t--force-refine \tdo not check TOC when refining a disc"); } };