You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Size score: the "1.0 MB/min ≈ 64 kbps" baseline is off by about 2x, so 64 kbps releases lose half their size points #318
scoreSize() in src/lib/utils/ranking-algorithm.ts gives the full 15 points at 1.0 MB/min, and the comment says that's "~64 kbps MP3 equivalent":
constsizeMB=torrent.size/(1024*1024);constmbPerMin=sizeMB/runtimeMinutes;// High quality baseline: 1.0 MB/min or higher gets full points// This is ~64 kbps MP3 equivalentif(mbPerMin>=1.0){return15;}returnmbPerMin*15;
With sizeMB in MiB, 1.0 MB/min is 1,048,576 × 8 / 60 ≈ 140 kbps. A 64 kbps file comes out at about 0.46 MB/min and scores 6.9/15. The comment and the constant disagree, and if 64 kbps is the intended baseline, the constant is the one to change.
Checked on v1.2.3. The function is unchanged on main as of 2026-10-04.
What it does in practice
I measured the last 20 releases imported on my instance. For 19 of them, the Audiobookshelf duration is within 0.3% of the Audible runtime. The 20th runs 7.8% longer, probably a different edition.
Bitrate (size ÷ runtime)
MB/min
Size score
Releases
~29 kbps
0.21
3.1
1
64 to 69 kbps
0.45 to 0.50
6.8 to 7.4
5
84 to 112 kbps
0.60 to 0.80
9.1 to 12.0
4
127 to 130 kbps
0.91 to 0.93
13.6 to 13.9
9
142 kbps
1.01
15.0
1
One release out of 20 got full size points. A 128 kbps MP3 gets 13.8, and a 64 kbps release gets 6.9.
Eight points rarely decide a ranking by themselves. The auto-download threshold is a hard 50, though (#223), and the title/author match is often partial: a subtitle in the Audible title, a different volume numbering format, or the author's name prefixed to the release name. In those cases the missing size points help push a correct release into "No quality matches". The ~29 kbps release in the table is one: complete (36-hour book), scored 3.1/15 for size and got rejected, so I picked it by hand in interactive search. With a 64 kbps baseline it would score 6.8.
Possible fix
If 64 kbps is the intended baseline, as the comment says:
If favouring ~128 kbps and up is deliberate, the constant can stay and the comment needs fixing. In that case documentation/phase3/ranking-algorithm.md could mention that 64 kbps releases start about 8 points down.
Related
Reject undersized releases in automatic search #311 adds a 0.25 MB/min floor for automatic search. Its "~32 kbps" uses the right conversion (0.25 MB/min ≈ 35 kbps). A data point for that PR: the complete ~29 kbps release above sits at 0.21 MB/min, so the floor would reject it.
@Eyji the comment and docs fix is out in v1.2.12: they now say full size points start around 140 kbps, which is what the code does. Scoring itself is unchanged.
Activity
kikootwo commentedon Oct 19, 2026
Thanks, the math is right. Full size points start around 140 kbps, not 64. The comment and docs will be fixed to describe what the code actually does.
Whether the baseline itself should move is tied to the auto-grab threshold, so that part goes with #223.
kikootwo commentedon Oct 27, 2026
@Eyji the comment and docs fix is out in v1.2.12: they now say full size points start around 140 kbps, which is what the code does. Scoring itself is unchanged.
docs: the size score gives full points from about 140 kbps, not 64 (k…