[PR #4958] feat: Display sampleRate and profile in audio file modal #4382

Open
opened 2026-04-25 00:19:32 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4958
Author: @H2OKing89
Created: 1/3/2026
Status: 🔄 Open

Base: masterHead: add-audio-samplerate-profile-ui


📝 Commits (1)

  • c19f0aa Display sampleRate and profile in audio file modal

📊 Changes

2 files changed (+19 additions, -5 deletions)

View changed files

📝 client/components/modals/AudioFileDataModal.vue (+17 -5)
📝 client/strings/en-us.json (+2 -0)

📄 Description

Brief summary

Adds frontend display for two new audio metadata fields in the Audio File Data modal:

  • Sample Rate (shown with Hz, e.g. 44100 Hz)
  • Profile (shown only when present, e.g. LC, HE-AAC, xHE-AAC)

Depends on: #4957 (backend extraction of these fields)

Which issue is fixed?

N/A (UI follow-up / depends on #4957)

In-depth Description

Follow-up to #4957 — now that the backend is extracting sampleRate and profile, this PR surfaces them in the UI so the modal reflects the full set of available audio metadata.


What changed

UI additions

  • Sample Rate
    • Displays the numeric sample rate with a Hz suffix (example: 48000 Hz)
  • Profile
    • Conditionally rendered (only appears when a value exists)
    • Helps distinguish AAC variants (LC vs HE-AAC vs xHE-AAC, etc.)

Layout improvement

Rebalanced the two-column layout for a cleaner scan path by moving Language to the left column and placing the new fields into the right column.

Left Column Right Column
Size Codec
Duration Channels
Format Bitrate
Chapters Sample Rate
Embedded Cover Profile
Language Time Base

Files touched

  • client/components/modals/AudioFileDataModal.vue

    • Added Sample Rate display with Hz suffix
    • Added Profile display (only when present)
    • Moved Language from right → left column for balance
  • client/strings/en-us.json

    • Added:
      • LabelProfile: Profile
      • LabelSampleRate: Sample Rate

How have you tested this?

  1. Applied backend changes from #4957
  2. Scanned library with test audiobooks
  3. Opened Audio File Data modal via the ℹ️ icon
  4. Verified Sample Rate displays correctly (example: 44100 Hz)
  5. Verified Profile behavior:
    • Displays for supported codecs (example: xHE-AAC, LC)
    • Hidden when not available

Screenshots

Click to expand screenshots

Audio File Data modal — Sample Rate + Profile

Audio File Data modal showing Sample Rate and Profile



Alternate example / codec variation

Audio File Data modal showing codec profile variation

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/4958 **Author:** [@H2OKing89](https://github.com/H2OKing89) **Created:** 1/3/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `add-audio-samplerate-profile-ui` --- ### 📝 Commits (1) - [`c19f0aa`](https://github.com/advplyr/audiobookshelf/commit/c19f0aaa7985ce93d0bf7515f48b8883d86ebea7) Display sampleRate and profile in audio file modal ### 📊 Changes **2 files changed** (+19 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `client/components/modals/AudioFileDataModal.vue` (+17 -5) 📝 `client/strings/en-us.json` (+2 -0) </details> ### 📄 Description ## Brief summary Adds frontend display for two new audio metadata fields in the **Audio File Data** modal: - **Sample Rate** (shown with `Hz`, e.g. `44100 Hz`) - **Profile** (shown only when present, e.g. `LC`, `HE-AAC`, `xHE-AAC`) **Depends on:** #4957 (backend extraction of these fields) ## Which issue is fixed? N/A (UI follow-up / depends on #4957) ## In-depth Description Follow-up to #4957 — now that the backend is extracting `sampleRate` and `profile`, this PR surfaces them in the UI so the modal reflects the full set of available audio metadata. --- ### What changed #### UI additions - **Sample Rate** - Displays the numeric sample rate with a `Hz` suffix (example: `48000 Hz`) - **Profile** - Conditionally rendered (only appears when a value exists) - Helps distinguish AAC variants (LC vs HE-AAC vs xHE-AAC, etc.) #### Layout improvement Rebalanced the two-column layout for a cleaner scan path by moving **Language** to the left column and placing the new fields into the right column. | Left Column | Right Column | |------------------|----------------| | Size | Codec | | Duration | Channels | | Format | Bitrate | | Chapters | Sample Rate | | Embedded Cover | Profile | | Language | Time Base | #### Files touched - **client/components/modals/AudioFileDataModal.vue** - Added **Sample Rate** display with `Hz` suffix - Added **Profile** display (only when present) - Moved **Language** from right → left column for balance - **client/strings/en-us.json** - Added: - `LabelProfile`: `Profile` - `LabelSampleRate`: `Sample Rate` ## How have you tested this? 1. Applied backend changes from #4957 2. Scanned library with test audiobooks 3. Opened **Audio File Data** modal via the ℹ️ icon 4. Verified **Sample Rate** displays correctly (example: `44100 Hz`) 5. Verified **Profile** behavior: - Displays for supported codecs (example: `xHE-AAC`, `LC`) - Hidden when not available ## Screenshots <details> <summary><strong>Click to expand screenshots</strong></summary> <br/> <p><strong>Audio File Data modal — Sample Rate + Profile</strong></p> <img width="1054" height="1022" alt="Audio File Data modal showing Sample Rate and Profile" src="https://github.com/user-attachments/assets/82c250d8-c914-469f-b02b-ba60425a5453" /> <br/><br/> <p><strong>Alternate example / codec variation</strong></p> <img width="1091" height="1021" alt="Audio File Data modal showing codec profile variation" src="https://github.com/user-attachments/assets/c51f9d2f-afeb-4c16-9333-f12c5c8c5395" /> <br/> </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:19:32 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4382