[Bug]: Podcast RSS Download with long titles #412

Closed
opened 2026-04-24 23:08:13 +02:00 by adam · 6 comments
Owner

Originally created by @ofifoto on GitHub (Jun 2, 2022).

Describe the issue

Hi! One podcast I subscribe to has super long titles sometimes (and sometimes with a newline), which causes audiobookshelf to crash/fail to download episodes. It'd be great if it could catch this somehow trim the title to be within limits.

Sadly I can't convince the publisher to shorten or fix the titles

Steps to reproduce the issue

  1. Click "Find Episodes"
  2. Select all
  3. Start downloading

here's the logs with a (censored, but same length) path that triggered the I/O error. (storage backend is rclone, unsure if other systems have similar limits)

/server/njodb/index.js:103                                                                                                              
        throw error;                                                                                                                                                                                                                                                             
        ^                                                                                                                               
                                                                                                                                                                                                                                                                                 
Error: EIO: i/o error, open '/podcasts/xxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxx.mp3'                                                                                              
Emitted 'error' event on WriteStream instance at:                                                                                       
    at emitErrorNT (node:internal/streams/destroy:157:8)                                                                                
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)                                                                                                                                                                                                                    
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {                                                                                                                                                                                                     
  errno: -5,                                                                                                                                                                                                                                                                     
  code: 'EIO',                                                                                                                          
  syscall: 'open',
  path: '/podcasts/xxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxx.mp3'
}

Audiobookshelf version

v2.0.18

How are you running audiobookshelf?

Docker

Originally created by @ofifoto on GitHub (Jun 2, 2022). ### Describe the issue Hi! One podcast I subscribe to has super long titles sometimes (and sometimes with a newline), which causes audiobookshelf to crash/fail to download episodes. It'd be great if it could catch this somehow trim the title to be within limits. Sadly I can't convince the publisher to shorten or fix the titles ### Steps to reproduce the issue 1. Click "Find Episodes" 2. Select all 3. Start downloading here's the logs with a (censored, but same length) path that triggered the I/O error. (storage backend is rclone, unsure if other systems have similar limits) ``` /server/njodb/index.js:103 throw error; ^ Error: EIO: i/o error, open '/podcasts/xxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx.mp3' Emitted 'error' event on WriteStream instance at: at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -5, code: 'EIO', syscall: 'open', path: '/podcasts/xxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx.mp3' } ``` ### Audiobookshelf version v2.0.18 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:08:13 +02:00
adam closed this issue 2026-04-24 23:08:13 +02:00
Author
Owner

@advplyr commented on GitHub (Jun 2, 2022):

That's strange to put newlines in an episode title, but either way we should be sanitizing the filename so thanks for catching that.

@advplyr commented on GitHub (Jun 2, 2022): That's strange to put newlines in an episode title, but either way we should be sanitizing the filename so thanks for catching that.
Author
Owner

@advplyr commented on GitHub (Jun 2, 2022):

Actually we are already sanitizing that filename, can you give a little more of the log since I'm not sure what is triggering that error. Is the episode getting saved at all to the file system?

@advplyr commented on GitHub (Jun 2, 2022): Actually we are already sanitizing that filename, can you give a little more of the log since I'm not sure what is triggering that error. Is the episode getting saved at all to the file system?
Author
Owner

@ofifoto commented on GitHub (Jun 2, 2022):

Will do! Thanks for looking into it :)

I’m not at my laptop at the moment but maybe it has to do with file length? I tried manually creating a file with the same name with touch sans new line and got an i/o error but when i hacked off a big chunk of the name touch succeeded

edit: i’ll have to double check but i believe there was no file made by abs for that episode

@ofifoto commented on GitHub (Jun 2, 2022): Will do! Thanks for looking into it :) I’m not at my laptop at the moment but maybe it has to do with file length? I tried manually creating a file with the same name with `touch` sans new line and got an i/o error but when i hacked off a big chunk of the name touch succeeded edit: i’ll have to double check but i believe there was no file made by abs for that episode
Author
Owner

@advplyr commented on GitHub (Jun 2, 2022):

The sanitize function I put in there was not removing line breaks and was not checking filename length.
The filename you had was exceeding the max length for Windows at least.

I fixed it for the next release. I think line breaks are legal in filenames but I can't think of any reason to leave them in, they could cause unexpected problems.

Grateful for those strange episode names after all!

@advplyr commented on GitHub (Jun 2, 2022): The sanitize function I put in there was not removing line breaks and was not checking filename length. The filename you had was exceeding the max length for Windows at least. I fixed it for the next release. I think line breaks are legal in filenames but I can't think of any reason to leave them in, they could cause unexpected problems. Grateful for those strange episode names after all!
Author
Owner

@ofifoto commented on GitHub (Jun 2, 2022):

Ah! Thanks for that. Will test and get back to you if it persists :)

@ofifoto commented on GitHub (Jun 2, 2022): Ah! Thanks for that. Will test and get back to you if it persists :)
Author
Owner

@advplyr commented on GitHub (Jun 5, 2022):

Fixed in v2.0.19

@advplyr commented on GitHub (Jun 5, 2022): Fixed in [v2.0.19](https://github.com/advplyr/audiobookshelf/releases/tag/v2.0.19)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#412