[Bug]: Podcasts with no episodes are shown as empty on re-scans #1074

Closed
opened 2026-02-20 01:14:28 -05:00 by deekerman · 9 comments
Owner

Originally created by @ThinkSalat on GitHub (Apr 12, 2023).

Describe the issue

every time the library rescans, about 80% of my podcast library gets an error "item directory not found". It has also crashed a couple times, wiping out all the podcasts episodes I queued to download.

I'm wondering what could be wrong. I tried podgrab last night and it downloaded a fair amount of podcasts into the same directory, as my plan was originally to just serve podcasts from audiobookshelf and use podgrab to handle downloading. i ditched podgrab as i hadn't realized audiobookshelf could handle that as well.

One of my poddcasts says it has like 600 files in it when there's only 200 episodes. I decided to delete all the podcast episodes manually, that had been deleted by podgrab, and the number of episodes didn't change when I rescanned.

It's all kind of a mess and I feel like starting over completely. That said, if I do take that approach, I don't know how to export OPML from audiobookshelf. How can I restore my podcast list and their metadata and settings if I delted everything and try again?

image
image

Steps to reproduce the issue

  1. Rescan library
  2. errors pop up on podcasts saying "Item directory is missing"

Audiobookshelf version

v2.2.18

How are you running audiobookshelf?

Docker

Originally created by @ThinkSalat on GitHub (Apr 12, 2023). ### Describe the issue every time the library rescans, about 80% of my podcast library gets an error "item directory not found". It has also crashed a couple times, wiping out all the podcasts episodes I queued to download. I'm wondering what could be wrong. I tried podgrab last night and it downloaded a fair amount of podcasts into the same directory, as my plan was originally to just serve podcasts from audiobookshelf and use podgrab to handle downloading. i ditched podgrab as i hadn't realized audiobookshelf could handle that as well. One of my poddcasts says it has like 600 files in it when there's only 200 episodes. I decided to delete all the podcast episodes manually, that had been deleted by podgrab, and the number of episodes didn't change when I rescanned. It's all kind of a mess and I feel like starting over completely. That said, if I do take that approach, I don't know how to export OPML from audiobookshelf. How can I restore my podcast list and their metadata and settings if I delted everything and try again? ![image](https://user-images.githubusercontent.com/31082405/231353550-8676a2d3-a7b9-4196-9cf6-cf149ff80c0b.png) ![image](https://user-images.githubusercontent.com/31082405/231353581-6dbb0b33-08f1-46ec-bb70-19e61277a201.png) ### Steps to reproduce the issue 1. Rescan library 2. errors pop up on podcasts saying "Item directory is missing" ### Audiobookshelf version v2.2.18 ### How are you running audiobookshelf? Docker
deekerman 2026-02-20 01:14:28 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@advplyr commented on GitHub (Apr 12, 2023):

Possibly related to #1447
This is most likely a file system issue. I have seen problems when people are using docker in a linux VM on Windows and mapping in Windows folders. Basically when hosting on linux but mapping in Windows drives or vice versa.
Can you explain how you are running Abs?

If you decide to start fresh then just don't delete the files you already downloaded. When you setup Abs you can scan your podcast library and the podcasts will show. They won't be linked to an RSS feed yet so you will then want to press edit on the podcast and use the "Match" tab to match it with the podcast.

@advplyr commented on GitHub (Apr 12, 2023): Possibly related to #1447 This is most likely a file system issue. I have seen problems when people are using docker in a linux VM on Windows and mapping in Windows folders. Basically when hosting on linux but mapping in Windows drives or vice versa. Can you explain how you are running Abs? If you decide to start fresh then just don't delete the files you already downloaded. When you setup Abs you can scan your podcast library and the podcasts will show. They won't be linked to an RSS feed yet so you will then want to press edit on the podcast and use the "Match" tab to match it with the podcast.
Author
Owner

@ThinkSalat commented on GitHub (Apr 12, 2023):

I’m just running on synology through docker. It should be pretty by the books. I think it may be because some of them don’t have any files in the directory. I clicked one that was showing the issue and added 3 podcasts to the queue. When one downloaded, the error when the away, even after re scanning. Perhaps the error handling is a little over zealous

@ThinkSalat commented on GitHub (Apr 12, 2023): I’m just running on synology through docker. It should be pretty by the books. I think it may be because some of them don’t have any files in the directory. I clicked one that was showing the issue and added 3 podcasts to the queue. When one downloaded, the error when the away, even after re scanning. Perhaps the error handling is a little over zealous
Author
Owner

@advplyr commented on GitHub (Apr 12, 2023):

Oh I see. Did you happen to do a re-scan of the podcast library before episodes were downloaded in those podcasts?

I'll have to test this but it is probably a bug because with podcasts they aren't required to have audio files to be in the library. With books we require an audio file or an ebook to exist before it can be in the library.

@advplyr commented on GitHub (Apr 12, 2023): Oh I see. Did you happen to do a re-scan of the podcast library before episodes were downloaded in those podcasts? I'll have to test this but it is probably a bug because with podcasts they aren't required to have audio files to be in the library. With books we require an audio file or an ebook to exist before it can be in the library.
Author
Owner

@ThinkSalat commented on GitHub (Apr 12, 2023):

That's probably it! Do you reuse the error code for both? And yes what happened was, I queued up every podcast I have (about 50) to download the back catalog, aside from some daily news podcasts. The queue said it had like 10,000 files queued up and the container died. I'm going through more slowly now. I see why allowing a "download all back episodes" isn't ready yet. If you have any pointers as to why the container could be so overloaded by that queue I could see if I can look into it myself! This project is awesome and I'd be happy to contribute!

@ThinkSalat commented on GitHub (Apr 12, 2023): That's probably it! Do you reuse the error code for both? And yes what happened was, I queued up every podcast I have (about 50) to download the back catalog, aside from some daily news podcasts. The queue said it had like 10,000 files queued up and the container died. I'm going through more slowly now. I see why allowing a "download all back episodes" isn't ready yet. If you have any pointers as to why the container could be so overloaded by that queue I could see if I can look into it myself! This project is awesome and I'd be happy to contribute!
Author
Owner

@advplyr commented on GitHub (Apr 12, 2023):

I'm not sure what would cause a crash because it should only be downloading 1 at a time. Possibly a memory limit was hit but we would have to see the logs for that.

@advplyr commented on GitHub (Apr 12, 2023): I'm not sure what would cause a crash because it should only be downloading 1 at a time. Possibly a memory limit was hit but we would have to see the logs for that.
Author
Owner

@ThinkSalat commented on GitHub (Apr 12, 2023):

Here's some of the code before and after a crash. The main thing I notice is that the server lost connection "ping timeout". I've removed server manager entries to clean it up a bit

{"timestamp":"2023-04-11 20:44:56","source":"Logger.js:104","message":"[Server] 1 Files Changed","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:46:35","source":"Logger.js:104","message":"[Server] Socket Y5aR9nLhrneljQoPAAAJ disconnected from client \"thinksalat\" after 3829671ms (Reason: ping timeout)","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:46:39","source":"Logger.js:104","message":"[Server] Socket Connected ssOCcRGnAaVpOcBuAAAL","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:48:45","source":"Logger.js:104","message":"[Server] 1 Files Changed","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"=== Starting Server ===","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[Server] Init v2.2.18","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 0 Collections Loaded","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 0 Playlists Loaded","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 0 Authors Loaded","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 0 Series Loaded","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 1 Users Loaded","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 2 Libraries Loaded","levelName":"INFO","level":2}

{"timestamp":"2023-04-11 20:49:34","source":"Logger.js:104","message":"[DB] 64 Library Items Loaded","levelName":"INFO","level":2}
@ThinkSalat commented on GitHub (Apr 12, 2023): Here's some of the code before and after a crash. The main thing I notice is that the server lost connection "ping timeout". I've removed server manager entries to clean it up a bit ``` {"timestamp":"2023-04-11 20:44:56","source":"Logger.js:104","message":"[Server] 1 Files Changed","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:46:35","source":"Logger.js:104","message":"[Server] Socket Y5aR9nLhrneljQoPAAAJ disconnected from client \"thinksalat\" after 3829671ms (Reason: ping timeout)","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:46:39","source":"Logger.js:104","message":"[Server] Socket Connected ssOCcRGnAaVpOcBuAAAL","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:48:45","source":"Logger.js:104","message":"[Server] 1 Files Changed","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"=== Starting Server ===","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[Server] Init v2.2.18","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 0 Collections Loaded","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 0 Playlists Loaded","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 0 Authors Loaded","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 0 Series Loaded","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 1 Users Loaded","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:49:33","source":"Logger.js:104","message":"[DB] 2 Libraries Loaded","levelName":"INFO","level":2} {"timestamp":"2023-04-11 20:49:34","source":"Logger.js:104","message":"[DB] 64 Library Items Loaded","levelName":"INFO","level":2} ```
Author
Owner

@advplyr commented on GitHub (Apr 12, 2023):

Socket connections come and go so it doesn't tell us much. I recommend turning on debug logs in settings -> logs and select debug in the dropdown.
I'll have do a test with a lot of episodes and see if I can reproduce it.

@advplyr commented on GitHub (Apr 12, 2023): Socket connections come and go so it doesn't tell us much. I recommend turning on debug logs in settings -> logs and select debug in the dropdown. I'll have do a test with a lot of episodes and see if I can reproduce it.
Author
Owner

@ThinkSalat commented on GitHub (Apr 12, 2023):

Thanks! I'll look into it as well

Message ID: @.***>

@ThinkSalat commented on GitHub (Apr 12, 2023): Thanks! I'll look into it as well > Message ID: ***@***.***> >
Author
Owner

@advplyr commented on GitHub (Apr 16, 2023):

Fixed in v2.2.19

@advplyr commented on GitHub (Apr 16, 2023): Fixed in [v2.2.19](https://github.com/advplyr/audiobookshelf/releases/tag/v2.2.19)
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#1074
No description provided.