-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Podcasts duplicate in UIs #2785
Comments
Can you disable the watcher in server settings as a test to see if you get duplicates on any episodes downloaded after that? |
Turned it off and restarted audiobookshelf's container. I'll cleanup the duplicates in the two library items I mentioned and see if they come back. |
Can you share some about how you are mapping volumes in docker and what file system/OS you are using? |
Yeah, here you are:
My audiobookshelf data is stored between two places: The metadata and config for it is stored on the host but the podcasts themselves are stored elsewhere (for size and reliability reasons) and then mounted via SMB on the host running the container. From there, the podcasts folder is bind mounted into Docker so audiobookshelf can see it. Here's the relevant part of my Dockercompose config: volumes:
- /home/user/deployment-data/audiobookshelf/audiobooks:/audiobooks:rw
- /mnt/media/podcasts:/podcasts:rw
- /home/user/deployment-data/audiobookshelf/metadata:/metadata
- /home/user/deployment-data/audiobookshelf/config:/config |
@advplyr Hiyo I'm back with with more info after more digging around. I started under the hypothesis this might have been something specific to my SMB share setup but after reviewing all the audiobookshelf logs with debug logging turned on, I saw nothing pointing at the storage location causing the weird broken episode duplicates. Starting this off, I double/extra/etc checked there aren't duplicates in the RSS feed: And now: Here's the debug and scanner logs when initiating a scan after removing 1 of the duplicate podcast episodes from the UI. Its a little odd that it says updated here but the scanner log says "new podcast episode".
And then the relevant part of the scanlog. The rest of it is just saying every other podcast is up to date:
When I remove one of these broken episodes, nothing indicates a problem:
Looking at the all episode list, the normal and broken episode appear ( So with not much progress on the surface the database got cloned to my computer and opened as well :) Despite deleting broken episodes in the UI, they still had a database entry, which looks very wrong compared to the correct one: There's a bunch of "haunted" items like this in my library throughout multiple podcasts, and those all have broken duplicate database entries: The interesting/important thing is that when I deleted the broken record from the Pretty puzzled how they got there, honestly. Nothing weird or dangerous has been done to the database or filesystem. Maybe its the result of broken RSS feeds churning and leaving remnants in the database if the creators re-uploaded etc? So that was a lot, but I'm interested in what you think of the broken database rows as someone who actually knows what everything should look like. Maybe a possible fix could be improving the scanner to look for any rows with a |
The enclosure fields are only populated if the episode was downloaded from an RSS feed. Not all podcast episodes need to come from an RSS feed, you may have audio files in your file system that are a podcast but don't have an associated RSS feed. So we wouldn't want to remove them automatically from the db like you are suggesting. That is what the duplicates you are seeing are. They are episodes that were scanned in from the file system and were not matched with an existing episode while being scanned in so a new episode was created. Still more information is needed to figure out what is going on. If you can enable Debug logs in the Logs page of settings this will provide more information during the scan. Also if you can be on the latest version v2.9.0 |
Got it 👍. Does the same train of thought apply to the
Sounds pretty strange, honestly. I don't manually edit the filesystem Audiobookshelf is working with and get everything from RSS. Could filesystem metadata changes (
All the logs I shared above were with
Yeah I will try, but I still don't know what actually causes these to be created. They have just randomly appeared so far.
I updated a few days ago, so all the logs above come from 2.9.0 :) Appreciate the help so far though. |
Tis back with more logs, if they are helpful @advplyr. A new episode of A More Civilized Age came out a few days ago and got duplicated in my library. Nothing about the storage backend for the episodes has changed at all and I haven't modified any files manually. I am currently running v2.11.0. If you want me to email you a zip file of the last week of logs. From the logs of the day it downloaded:
Following days when re-scans occurred:
|
I can't think of any reasons for it |
I came across the duplicate podcast episode but after reading through your issue again I don't think it is the same. It is a different bug where the scanner can scan in the audio file while it is being downloaded causing a duplicate episode with bad data like a different duration. I'm not sure if I mentioned this before elsewhere but Abs uses the inode value of the files to see if they already exist. If you are using CIFS there is a setting that needs to be enabled called |
I return, again, hello. I've concluded the test that I mentioned I was going to experiment with a few weeks ago. My test library seems to now support the theory I wrote out before about a race condition. A new episode of my sample podcast came out a few days ago and so I went to go check on how both my libraries handled it. The results came out as hypothesized :) You can see here below that the real library ended up with yet another duplicate for this episode. But the test library (which is also being stored on my NAS via SMB) did not duplicate anything at all: Again, the only difference between these two is the time they check for episodes daily in the podcast's configuration. This seems like decently strong evidence supporting the theory of a race condition, and maybe is something that you could try and configure yourself locally to reproduce with 100% certainty. I also made sure some other podcasts had their automatic download timer staggered compared to the library-wide scan and I have not seen any duplicates arrive from them either. |
I was able to fix the issue where the scanner runs while an episode is being downloaded causing a duplicate |
Hurray, thanks 🎉. Will give it a spin once a new release goes out. |
Fixed in v2.17.0. |
Describe the issue
Audiobookshelf seems to be generating, or somehow finding, duplicate episodes of multiple podcasts I have added and listen to. This is similar to #2122 but doesn't create duplicate files on disk and happens in versions after that bugfix.
Weirdly this doesn't happen with every single podcast in my library, just a few. The ones I notice the most are:
Nothing jumps out in my logs either, though let me know if I should enable debug logs for a week or so to help.
I've deleted duplicates from the library multiple times at this point, but they just seem to be coming back. For example AMCA's library entry has every new episode duplicated right now:
One of each is not linked to an RSS episode:
And there are no duplicates on disk. They're purely database/UI located. They show up duplicated in both the web UI and Android app:
Steps to reproduce the issue
Schedule Automatic Episode Downloads
. I have it running every day at midnight.Audiobookshelf version
2.8.0
How are you running audiobookshelf?
Docker
The text was updated successfully, but these errors were encountered: