private static int findTrackIdAtOffset ( SlotReference slot , Client client , int offset ) throws IOException { Message entry = client . renderMenuItems ( Message . MenuIdentifier . MAIN_MENU , slot . slot , CdjStatus . TrackType . REKORDBOX , offset , 1 ) . get ( 0 ) ; if ( entry . getMenuItemType ( ) == Message . MenuItemType . UNKNOWN ) { logger . warn ( "Encountered unrecognized track list entry item type: {}" , entry ) ; } return ( int ) ( ( NumberField ) entry . arguments . get ( 1 ) ) . getValue ( ) ; }
As part of checking whether a metadata cache can be auto - mounted for a particular media slot this method looks up the track at the specified offset within the player s track list and returns its rekordbox ID .