Skip to content

[FEATURE] feat(ripper): sort main feature by chapters, filesize, then…#1698

Merged
microtechno9000 merged 4 commits intoautomatic-ripping-machine:mainfrom
kp1349:main
Mar 12, 2026
Merged

[FEATURE] feat(ripper): sort main feature by chapters, filesize, then…#1698
microtechno9000 merged 4 commits intoautomatic-ripping-machine:mainfrom
kp1349:main

Conversation

@kp1349
Copy link
Copy Markdown
Contributor

@kp1349 kp1349 commented Feb 8, 2026

… track number (#1697)

  • feat(ripper): sort main feature by chapters, filesize, then track number

Updated main feature scan to now look at chapters and filesizes. Updated database to keep track of these new values as well.

Sorts tracks by highest chapter count, then largest filesize, then lowest track number to better identify the main feature on Disney Blu-rays.

New Feature - Updated main feature scan to now look at chapters and filesizes. Updated database to keep track of these new values as well.
Patch or Bugfix - [BUGFIX]

Description

Sorts tracks by highest chapter count, then largest filesize, then lowest track number to better identify the main feature on Disney Blu-rays.

Fixes #1697

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration

I have loaded American Sniper, The Incredibles, Tarzan, & Finding Nemo

  • Docker
  • Other (Please state here)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have tested that my fix is effective or that my feature works

Changelog:

Include the details of changes made here

  • added arm/migrations/versions/edf2272c0a9d_track_chapters_filesize.py to add track chapter sizes and track file sizes to DB
  • modified arm/models/track.py to load the values from the DB
  • modified arm/ripper/makemkv.py to read in the new values and sort by chapters first, then filesizes, then track number
  • modified arm/ripper/makemkv.py to use 'minlength' value from the arm.yaml config file instead of defaulting to 0 (for consistency when ripping)
  • modified arm/ripper/utils.py to write new values into the DB

Logs

Attach logs from successful test runs here
Tarzan:
tarzan.log
American Sniper:
American Sniper.log

… track number (automatic-ripping-machine#1697)

* feat(ripper): sort main feature by chapters, filesize, then track number

Updated main feature scan to now look at chapters and filesizes.
Updated database to keep track of these new values as well.

Sorts tracks by highest chapter count, then largest filesize,
then lowest track number to better identify the main feature
on Disney Blu-rays.

Fixes automatic-ripping-machine#1697

* Update VERSION
uprightbass360 added a commit to uprightbass360/automatic-ripping-machine-neu that referenced this pull request Mar 3, 2026
…ping-machine#1605, automatic-ripping-machine#1660

PR automatic-ripping-machine#1698 — Main feature chapters/filesize sorting:
- Add chapters (Integer) and filesize (BigInteger) to Track model
- Parse MakeMKV TINFO fields 8 (chapters) and 11 (filesize)
- Sort main feature by chapters desc, length desc, filesize desc,
  track_number asc — fixes Disney Blu-ray playlist obfuscation
- Add BigInteger to database layer exports
- Migration: a4b5c6d7e8f9

PR automatic-ripping-machine#1605 — TV series disc label parsing:
- Add parse_disc_label_for_identifiers() for labels like
  STARGATE_ATLANTIS_S1_D2 → S1D2
- Add normalize_series_name() and get_tv_folder_name()
- Integrate into Job.build_final_path() for TV series
- Config keys: USE_DISC_LABEL_FOR_TV, GROUP_TV_DISCS_UNDER_SERIES
- Migration: b5c6d7e8f9a0

PR automatic-ripping-machine#1660 — Config file ownership fix:
- Replace cp --no-clobber with install -o arm -g arm -m 644
  in arm_user_files_setup.sh to set ownership atomically

Includes 33 new tests covering all three features.
uprightbass360 added a commit to uprightbass360/automatic-ripping-machine-neu that referenced this pull request Mar 4, 2026
…ping-machine#1605, automatic-ripping-machine#1660

PR automatic-ripping-machine#1698 — Main feature chapters/filesize sorting:
- Add chapters (Integer) and filesize (BigInteger) to Track model
- Parse MakeMKV TINFO fields 8 (chapters) and 11 (filesize)
- Sort main feature by chapters desc, length desc, filesize desc,
  track_number asc — fixes Disney Blu-ray playlist obfuscation
- Add BigInteger to database layer exports
- Migration: a4b5c6d7e8f9

PR automatic-ripping-machine#1605 — TV series disc label parsing:
- Add parse_disc_label_for_identifiers() for labels like
  STARGATE_ATLANTIS_S1_D2 → S1D2
- Add normalize_series_name() and get_tv_folder_name()
- Integrate into Job.build_final_path() for TV series
- Config keys: USE_DISC_LABEL_FOR_TV, GROUP_TV_DISCS_UNDER_SERIES
- Migration: b5c6d7e8f9a0

PR automatic-ripping-machine#1660 — Config file ownership fix:
- Replace cp --no-clobber with install -o arm -g arm -m 644
  in arm_user_files_setup.sh to set ownership atomically

Includes 33 new tests covering all three features.
Copy link
Copy Markdown
Collaborator

@microtechno9000 microtechno9000 left a comment

Choose a reason for hiding this comment

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

Nice feature, good logs. LGTM

@microtechno9000 microtechno9000 merged commit 13dfc7f into automatic-ripping-machine:main Mar 12, 2026
8 checks passed
@sonarqubecloud
Copy link
Copy Markdown

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.

🔧 Search Main feature based on number of chapters and size of track

2 participants