[Bug]: Library Items API media.size property for Podcasts does not include any media items #2703

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

Originally created by @pwinnski on GitHub (Apr 2, 2025).

What happened?

I added some new podcasts 2025-03-27, and before that on 2025-01-09. When I query the API with /api/libraries/{library_id}/items on a Podcasts library, the items I've added most recently have a very small number for both size and media.size. The number reflects only the size of cover.jpg and metadata.json, none of the media files.

For the podcasts I added previously, the sizes aren't quite so tiny to stand out, but I checked one with regular larges episodes and realized that it has also stopped updating the number: the UI says 35.56 GB, but the size and media.size properties are both 34114816409, which is 31.77 GB.

What did you expect to happen?

I expect the /api/libraries/{library_id}/items API response to include accurate sizes for podcasts, as it does for audiobooks. I expect it to do what /api/items/{item_id} does to populate media.size.

Steps to reproduce the issue

  1. Add a new podcast.
  2. Download some episodes.
  3. Query the API's /api/libraries/{library_id}/items endpoint.
  4. Observe that the size and media.size do not reflect downloaded episodes.

Audiobookshelf version

v2.20.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

From API call:
...
           'coverPath': '/podcasts/Dakota Gold Mysteries/cover.jpg',
           'tags': [],
           'numEpisodes': 4,
           'autoDownloadEpisodes': False,
           'autoDownloadSchedule': '0 * * * *',
           'lastEpisodeCheck': 1743121949583,
           'maxEpisodesToKeep': 0,
           'maxNewEpisodesToDownload': 3,
           'size': 66112},
 'numFiles': 5,
 'size': 66112}

vs UI API call for individual item:
...
        "coverPath": "/podcasts/Dakota Gold Mysteries/cover.jpg",
        "tags": [],
        "episodes": REMOVED_FOR_SPACE,
        "autoDownloadEpisodes": false,
        "autoDownloadSchedule": "0 * * * *",
        "lastEpisodeCheck": 1743121949583,
        "maxEpisodesToKeep": 0,
        "maxNewEpisodesToDownload": 3,
        "size": 129656129
    },
    "libraryFiles": REMOVED_FOR_SPACE,
    "size": 66112,
    "rssFeed": null,
    "episodeDownloadsQueued": []
}

Additional Notes

Knowing how far off that podcast with regular large episodes is, I could probably come pretty close to figuring out the date this changed, if that helps.

Originally created by @pwinnski on GitHub (Apr 2, 2025). ### What happened? I added some new podcasts 2025-03-27, and before that on 2025-01-09. When I query the API with `/api/libraries/{library_id}/items` on a Podcasts library, the items I've added most recently have a very small number for both `size` and `media.size`. The number reflects only the size of `cover.jpg` and `metadata.json`, none of the media files. For the podcasts I added previously, the sizes aren't quite so tiny to stand out, but I checked one with regular larges episodes and realized that it has also stopped updating the number: the UI says 35.56 GB, but the `size` and `media.size` properties are both `34114816409`, which is 31.77 GB. ### What did you expect to happen? I expect the `/api/libraries/{library_id}/items` API response to include accurate sizes for podcasts, as it does for audiobooks. I expect it to do what `/api/items/{item_id}` does to populate `media.size`. ### Steps to reproduce the issue 1. Add a new podcast. 2. Download some episodes. 3. Query the API's `/api/libraries/{library_id}/items` endpoint. 4. Observe that the `size` and `media.size` do not reflect downloaded episodes. ### Audiobookshelf version v2.20.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell From API call: ... 'coverPath': '/podcasts/Dakota Gold Mysteries/cover.jpg', 'tags': [], 'numEpisodes': 4, 'autoDownloadEpisodes': False, 'autoDownloadSchedule': '0 * * * *', 'lastEpisodeCheck': 1743121949583, 'maxEpisodesToKeep': 0, 'maxNewEpisodesToDownload': 3, 'size': 66112}, 'numFiles': 5, 'size': 66112} vs UI API call for individual item: ... "coverPath": "/podcasts/Dakota Gold Mysteries/cover.jpg", "tags": [], "episodes": REMOVED_FOR_SPACE, "autoDownloadEpisodes": false, "autoDownloadSchedule": "0 * * * *", "lastEpisodeCheck": 1743121949583, "maxEpisodesToKeep": 0, "maxNewEpisodesToDownload": 3, "size": 129656129 }, "libraryFiles": REMOVED_FOR_SPACE, "size": 66112, "rssFeed": null, "episodeDownloadsQueued": [] } ``` ### Additional Notes Knowing how far off that podcast with regular large episodes is, I could probably come pretty close to figuring out the date this changed, if that helps.
adam added the bug label 2026-04-25 00:09:42 +02:00
adam closed this issue 2026-04-25 00:09:42 +02:00
Author
Owner

@advplyr commented on GitHub (Apr 2, 2025):

Can you confirm if the size shown on the podcasts page is accurate?

Image

@advplyr commented on GitHub (Apr 2, 2025): Can you confirm if the size shown on the podcasts page is accurate? ![Image](https://github.com/user-attachments/assets/901e793d-722b-444e-b02d-a7ba68a35ee6)
Author
Owner

@pwinnski commented on GitHub (Apr 2, 2025):

That seems be to accurate, so the correct number is in the items/{item_id} result, just not the libraries/{library_id}/items result.

@pwinnski commented on GitHub (Apr 2, 2025): That seems be to accurate, so the correct number is in the `items/{item_id}` result, just not the `libraries/{library_id}/items` result.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 27, 2025):

Fixed in v2.21.0.

@github-actions[bot] commented on GitHub (Apr 27, 2025): Fixed in [v2.21.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.21.0).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2703