[Bug]: index column in podcastEpisodes table always has -Inf as value #2089

Open
opened 2026-04-25 00:03:23 +02:00 by adam · 3 comments
Owner

Originally created by @nichwall on GitHub (Jul 8, 2024).

What happened?

The index column of the podcastEpisodes table seems to have been broken around server version 2.9.0. Podcast episodes downloaded before February 2024 (not sure exactly when I upgraded my main server) have the index column set, but all of the rows have -Inf as their value if the extraData column has data other than {}. Screenshots from the database below.

Episodes from before 2.9.0:
index_normal

Episodes downloaded beginning with 2.9.0:
index_infinity

What did you expect to happen?

Consistent data types for the OpenAPI spec, or some sort of database migration to keep everything consistent.
I'm not really sure how the "previous" and "next" logic works in the web client Episodes modal because the web client is behaving as expected for episodes with and without the index column set correctly. If the modal is just using the series and episode field, maybe this column can be removed?

Steps to reproduce the issue

  1. Download podcast episodes from before 2.9.0 and after upgrading to 2.9.0 and inspect the database.

Audiobookshelf version

v2.10.1

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

No response

Additional Notes

No response

Originally created by @nichwall on GitHub (Jul 8, 2024). ### What happened? The `index` column of the `podcastEpisodes` table seems to have been broken around server version `2.9.0`. Podcast episodes downloaded before February 2024 (not sure exactly when I upgraded my main server) have the `index` column set, but all of the rows have `-Inf` as their value if the `extraData` column has data other than `{}`. Screenshots from the database below. Episodes from before `2.9.0`: ![index_normal](https://github.com/advplyr/audiobookshelf/assets/5686638/d632ce46-ab7b-4cef-8175-a896844478bb) Episodes downloaded beginning with `2.9.0`: ![index_infinity](https://github.com/advplyr/audiobookshelf/assets/5686638/2c330df7-33cc-4f33-a822-e7350186c82d) ### What did you expect to happen? Consistent data types for the OpenAPI spec, or some sort of database migration to keep everything consistent. I'm not really sure how the "previous" and "next" logic works in the web client Episodes modal because the web client is behaving as expected for episodes with and without the `index` column set correctly. If the modal is just using the series and episode field, maybe this column can be removed? ### Steps to reproduce the issue 1. Download podcast episodes from before `2.9.0` and after upgrading to `2.9.0` and inspect the database. ### Audiobookshelf version v2.10.1 ### 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 _No response_ ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:03:23 +02:00
Author
Owner

@advplyr commented on GitHub (Jul 12, 2024):

I'm not sure if we should remove that column yet. Originally podcast episodes would set that index column and allow for sorting podcast episodes. Sorting was removed but the index column remained getting updated for a while even though it wasn't used for anything. I'm not sure why it is -Inf so that should be fixed regardless

@advplyr commented on GitHub (Jul 12, 2024): I'm not sure if we should remove that column yet. Originally podcast episodes would set that index column and allow for sorting podcast episodes. Sorting was removed but the index column remained getting updated for a while even though it wasn't used for anything. I'm not sure why it is -Inf so that should be fixed regardless
Author
Owner

@nichwall commented on GitHub (Jul 12, 2024):

That's fair. Removing the column from the database would also make rolling back to older versions more difficult. I mean if it isn't being used by a client then it can be removed from the API.

@nichwall commented on GitHub (Jul 12, 2024): That's fair. Removing the column from the database would also make rolling back to older versions more difficult. I mean if it isn't being used by a client then it can be removed from the API.
Author
Owner

@advplyr commented on GitHub (Jul 12, 2024):

Yeah it can be removed from the API

@advplyr commented on GitHub (Jul 12, 2024): Yeah it can be removed from the API
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2089