[Enhancement]: Read TPA from ID3v2.2 tags for Disc number #1118

Closed
opened 2026-02-20 10:06:54 -05:00 by deekerman · 4 comments
Owner

Originally created by @rummyr on GitHub (May 3, 2023).

Describe the feature/enhancement

Can you add the ID3v2,2 tag TPA to the line
file_tag_disc: tryGrabTags(format, 'discnumber', 'disc', 'disk', 'tpos', 'tpa'),
in server/utils/prober.js

see https://wiki.hydrogenaud.io/index.php?title=Tag_Mapping

I have some books that have the same track number but different TPA

e.g.
track : 1/7 TPA : 1/2 1-01 XYZ Part 1 Track 01
track : 1/9 TPA : 2/2 2-01 XYZ Part 2 Track 01

Originally created by @rummyr on GitHub (May 3, 2023). ### Describe the feature/enhancement Can you add the ID3v2,2 tag TPA to the line file_tag_disc: tryGrabTags(format, 'discnumber', 'disc', 'disk', 'tpos'**, 'tpa'**), in server/utils/prober.js see https://wiki.hydrogenaud.io/index.php?title=Tag_Mapping I have some books that have the same track number but different TPA e.g. track : 1/7 TPA : 1/2 1-01 XYZ Part 1 Track 01 track : 1/9 TPA : 2/2 2-01 XYZ Part 2 Track 01
deekerman 2026-02-20 10:06:54 -05:00
Author
Owner

@advplyr commented on GitHub (May 3, 2023):

Do you know if ffprobe picks up this tag?

@advplyr commented on GitHub (May 3, 2023): Do you know if ffprobe picks up this tag?
Author
Owner

@rummyr commented on GitHub (May 3, 2023):

ffprobe output

  Metadata:                                                                                                                                   
    artist          :  XXXX                                                                                                  
    album_artist    : XXX/XXX                                                                                                
    TCM             : XXX XXX XXX                                                                                                      
    album           : XXX - XXX                                                                                                 
    track           : 4/48                                                                                                                    
    TPA             : 1/2                                                                                                                     
    title           : XXX Part 1 Track 03                                                                                              
    genre           : Audiobooks                                                                                                              
    iTunPGAP        : 0                                                                                                                       
    encoded_by      : iTunes 12.0.1.26                                                                                                        
    iTunNORM        :  000004B7 000007B8 00008A3E 0000B5D5 0000E8F5 00002192 00008070 000080B9 0000D4F5 00002572                              
    iTunSMPB        :  00000000 00000210 00000810 00000000003376E0 00000000 0025453A 00000000 00000000 00000000 00000000 00000000 00000000    
    comment         : http://XXX                                                                      
                    :                                                                                                                         
    TT3             : The XXX breaks down in a forbidden sector of space. XXX?       
    date            : 2007                                                                                                                    
  Duration: 00:01:16.54, start: 0.000000, bitrate: 493 kb/s                                                                                   
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s                                                                                   
  Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1417x1417 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn (attached pic
)                                                                                                                                             
    Metadata:                                                                                                                                 
      comment         : Other    

It really is called Track 03 despite being track 4 .. TRUE track 1 is an "ident" track

@rummyr commented on GitHub (May 3, 2023): ffprobe output ```Input #0, mp3, from '1-04 Absolution Part 1 Track 03.mp3': Metadata: artist : XXXX album_artist : XXX/XXX TCM : XXX XXX XXX album : XXX - XXX track : 4/48 TPA : 1/2 title : XXX Part 1 Track 03 genre : Audiobooks iTunPGAP : 0 encoded_by : iTunes 12.0.1.26 iTunNORM : 000004B7 000007B8 00008A3E 0000B5D5 0000E8F5 00002192 00008070 000080B9 0000D4F5 00002572 iTunSMPB : 00000000 00000210 00000810 00000000003376E0 00000000 0025453A 00000000 00000000 00000000 00000000 00000000 00000000 comment : http://XXX : TT3 : The XXX breaks down in a forbidden sector of space. XXX? date : 2007 Duration: 00:01:16.54, start: 0.000000, bitrate: 493 kb/s Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1417x1417 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn (attached pic ) Metadata: comment : Other ``` It really is called Track 03 despite being track 4 .. TRUE track 1 is an "ident" track
Author
Owner

@rummyr commented on GitHub (May 3, 2023):

I actually "hacked" the suggested change into my docker and it seemed to resolve the problems I was having without needing to rename the files.
I was getting the tracks interleaved..
1-01 title Part 01 Track 01
2-01 title Part 03 Track 01
1-02 title Part 01 Track 02
2-02 title Part 03 Track 02
....

Though I did need to do some deleting + adding to get the new track order

@rummyr commented on GitHub (May 3, 2023): I actually "hacked" the suggested change into my docker and it seemed to resolve the problems I was having without needing to rename the files. I was getting the tracks interleaved.. 1-01 title Part 01 Track 01 2-01 title Part 03 Track 01 1-02 title Part 01 Track 02 2-02 title Part 03 Track 02 .... Though I did need to do some deleting + adding to get the new track order
Author
Owner

@advplyr commented on GitHub (May 5, 2023):

Added in v2.2.20

@advplyr commented on GitHub (May 5, 2023): Added in [v2.2.20](https://github.com/advplyr/audiobookshelf/releases/tag/v2.2.20)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/audiobookshelf-advplyr#1118
No description provided.