Skip to content

More scanning rework#5447

Merged
inactive123 merged 11 commits intolibretro:masterfrom
bkoropoff:scanning2
Sep 19, 2017
Merged

More scanning rework#5447
inactive123 merged 11 commits intolibretro:masterfrom
bkoropoff:scanning2

Conversation

@bkoropoff
Copy link
Copy Markdown
Contributor

  • As discussed before, use largest data track for CRC identification
  • Make scanning cue files work with a database using data track CRCs
  • As a bonus, scanning cue files that have multiple tracks in the same physical file now works

It occurs to me that scanning a directory with both a cue and a data track in its own file will now detect both, which means the wrong one may end up getting added to the playlist. It also wastes a lot of time scanning binaries we don't care about, so this should probably be fixed by e.g. scanning cue files first, then removing any references files from the remainder of the list to be scanned. This, as well as GDI file support, will have to come later.

Sorry for some of the unintentional reformatting, I need to write a clang-format file for retroarch.

@bkoropoff
Copy link
Copy Markdown
Contributor Author

GDI files (and derived CHDs) seem to work.

Comment thread tasks/task_database.c Outdated
if (chd_get_serial(name, db_state->serial))
/* There are no serial databases, so don't bother with
serials at the moment */
if (0 && chd_get_serial(name, db_state->serial))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will always skip? Should we just remove this code?

Copy link
Copy Markdown
Contributor Author

@bkoropoff bkoropoff Sep 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It prevents an unused function warning, and makes it easy to enable later.

@bkoropoff
Copy link
Copy Markdown
Contributor Author

OK, it'll now avoid scanning tracks twice when scanning a directory. It'll also avoid scanning tracks that aren't used for identification.

@inactive123
Copy link
Copy Markdown
Contributor

Seems there is a merge conflict which needs fixing.

- Use the primary (largest data) track for CRC identification, as it
  seems least likely to be shared among multiple discs
- CRC the primary track when importing a loose .cue file.
- If multiple tracks are in the same file, CRC the correct chunk
Scan them before the tracks so we can avoid scanning large
files we don't need to.
Since we use cue/gdi files to find the right track file to
scan, don't bother scanning them separately.
@bkoropoff
Copy link
Copy Markdown
Contributor Author

Rebased. The Travis failure is an apt-get problem.

@inactive123 inactive123 merged commit ee06a8f into libretro:master Sep 19, 2017
@bkoropoff bkoropoff deleted the scanning2 branch September 20, 2017 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants