-
-
Notifications
You must be signed in to change notification settings - Fork 2
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] No audio playing #56
Comments
Hey, thank you! I created it for the lack of audiobook bots and Im happy you found some use out of it. From what Im seeing at a glance everything you have is correctly setup. Depending on your setup I have noticed that on windows (Docker) sometimes doesn't play right away or has an issue streaming even if the server is accessible. Ill do some testing and let you know if I can help :) |
Still looking into this. What could help also, is if you could turn on |
Thanks for your answer! I started building a bot myself last year and quicly quit due to the requried effort... So hats off to you! I can't access my server right now, so the screenshot will follow. The issue occured for me on the following setups
When debugging, I found the used url for streaming, which worked when loading it manually via my browser. |
Here are some logs. I'm not sure what the issue is. If you need access to my audiobookshelf instance/discord bot I'd be glad to provide it. (Always a great idea ;) )
|
I used a small bot that just plays a local mp3 file to check if I have correct permissions. The bot is able to play the mp3 file correctly! |
Looking at your logs, everything is working correctly and you have no errors, also the fact that the web browser was playing from the URL is a great sign that your connection and token were both valid and everything (should have) worked. Do the other commands work as intended? One thing maybe to try, is change "OWNER_ONLY" to True. It may be affecting something that's related to an old module I disabled. The only other suggestion I have is try to restart discord while the bot and you are connected to discord by using ctrl and r. |
I tried playing with the OWNER_ONLY and multiuser variables. However, these seem to not change anything. However, I managed to play an audiobook! It seems, that the issue lies in the 'format' of audiobooks.
When trying to play an audiobook consisting of multiple .mp3 files, the indicated progress is correct, but a wrong audio file is played. The audiobooks I did my testing with earlier all have a silent part in the end, which seems to have played... |
That would explain it! I believe my library is 99% m4b files. Although I have tested with some mp3 files in the beginning I may need to change some ffmpeg parameters. |
Also, regarding your logs, the error that is being thrown is because there was no chapter data able to be pulled. This has given me lots of edge cases to think about! Lol |
In bookshelfAPI.py, line 702-703 for file in audiofiles:
ino = file['ino'] The last mp3 file is selected for play. Thats why it always jumps to the end. Do you have time to look into this or should I try my hand? I'm currently pretty busy myself :/ Edit: I guess for now, I will simply use the Audiobookshelf tool to convert my audiobooks to m4b files. |
I've been trying to crack at this but haven't had a chance to fix this fully. I need to revamp the whole chapter select system and audio tracking portion which is not a small task. I have made small improvements but not gonna push that just yet because I'd like it to fully incorporate a fix for this and a few other scenarios. :) |
I've also had a look at this and came to a similar conclusion. Did not have the time to fix anything though :/ Take your time! I've converted everything to m4b and your bot is working great with those. Thanks a lot again :) |
First of all: Thanks for creating this! I really love the idea ❤️
Describe the bug
The bot joins my audio channel after entering the play command. However, no audio is played. Log seems good.
The progress is synced with my audiobookshelf server.
I first played via https; then changed to direct http connection via ip in tailscale network. I also tried hosting the bot on the same server as audiobookshelf with local ip. All lead to the same issue.
To Reproduce
Expected behavior
The audiobook can be listened to
Logs
Docker compose file
Do you need any more information?
Edit:

I have these Intents set:
I also invited the bot via the generated invite link and accepted all permissions, this did not work either.
Running in a python venv does also not work.
The text was updated successfully, but these errors were encountered: