Failed to get track number for single file audiobooks #175

Closed
opened 2026-04-24 23:00:09 +02:00 by adam · 3 comments
Owner

Originally created by @MartinCa on GitHub (Jan 11, 2022).

Following commit afd2b8c98f the error message "Failed to get track number" is shown for single file audiobooks. Prior to this commit it seems validateTrackIndex was only called when an audiobook contained more than one file.

I believe the code could be changed to have a special case when there is only one file since sorting would also be trivial in that case.

Originally created by @MartinCa on GitHub (Jan 11, 2022). Following commit afd2b8c98f9ec7c7615b469bffce23f9bc1b8094 the error message "Failed to get track number" is shown for single file audiobooks. Prior to this commit it seems `validateTrackIndex` was only called when an audiobook contained more than one file. I believe the code could be changed to have a special case when there is only one file since sorting would also be trivial in that case.
adam closed this issue 2026-04-24 23:00:09 +02:00
Author
Owner

@advplyr commented on GitHub (Jan 11, 2022):

I actually fixed that in the release last night: https://github.com/advplyr/audiobookshelf/commit/e5f8be5b2460ed98f38564e9ff4a04622c578951

@advplyr commented on GitHub (Jan 11, 2022): I actually fixed that in the release last night: https://github.com/advplyr/audiobookshelf/commit/e5f8be5b2460ed98f38564e9ff4a04622c578951
Author
Owner

@MartinCa commented on GitHub (Jan 11, 2022):

Sounds great, sorry about the issue then. I tested with scanning yesterday and decided to investigate why it was suddenly happening today.

I will test again.

@MartinCa commented on GitHub (Jan 11, 2022): Sounds great, sorry about the issue then. I tested with scanning yesterday and decided to investigate why it was suddenly happening today. I will test again.
Author
Owner

@MartinCa commented on GitHub (Jan 11, 2022):

I just rescanned my library and no errors reported this time so it seems the fix worked for me 👍

@MartinCa commented on GitHub (Jan 11, 2022): I just rescanned my library and no errors reported this time so it seems the fix worked for me 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#175