[Bug]: Date and Episode Number Ignored in Filename #1547

Closed
opened 2026-04-24 23:49:40 +02:00 by adam · 9 comments
Owner

Originally created by @feerlessleadr on GitHub (Nov 23, 2023).

Describe the issue

Hi, not sure this is a bug or a feature Request, so please forgive me if this is wrong.

I manually download some YouTube videos as audio files using yt-dlp to be listened as podcasts, and for the most part it works great.

In the Filename, I start with the current date, the episode number, and then the episode title. I do this because obviously the ABS server doesn't know the episode number or publication date of the file in the metadata, so I needed a way sort the episodes to figure out which one I wanted to listen to.

Normally, in ABS, the episode listed includes the full filename, including the date and episode number.

I haven't listened to this particular podcast in a while, so when I went to listen today, I realized that the episodes in ABS no longer lists the date and episode in the episode name in the server, it only lists the title.

When I check the path and filename in ABS underneath the episode, it lists the date and episode number still in the path.

Unfortunately, now I'm not able to sort my podcasts by name anymore, because the date is no longer included in ABS.

Hopefully that makes sense.

Steps to reproduce the issue

  1. Manually download with date at beginning of Filename outside of AB
  2. Copy to the podcast series folder
  3. Scan the library to add the new file to ABS (aka have ABS recognize the file)
  4. Check the podcast series and the date will be in the filename but won't be in the episode name in ABS.

Audiobookshelf version

2.5.0

How are you running audiobookshelf?

Docker

Originally created by @feerlessleadr on GitHub (Nov 23, 2023). ### Describe the issue Hi, not sure this is a bug or a feature Request, so please forgive me if this is wrong. I manually download some YouTube videos as audio files using yt-dlp to be listened as podcasts, and for the most part it works great. In the Filename, I start with the current date, the episode number, and then the episode title. I do this because obviously the ABS server doesn't know the episode number or publication date of the file in the metadata, so I needed a way sort the episodes to figure out which one I wanted to listen to. Normally, in ABS, the episode listed includes the full filename, including the date and episode number. I haven't listened to this particular podcast in a while, so when I went to listen today, I realized that the episodes in ABS no longer lists the date and episode in the episode name in the server, it only lists the title. When I check the path and filename in ABS underneath the episode, it lists the date and episode number still in the path. Unfortunately, now I'm not able to sort my podcasts by name anymore, because the date is no longer included in ABS. Hopefully that makes sense. ### Steps to reproduce the issue 1. Manually download with date at beginning of Filename outside of AB 2. Copy to the podcast series folder 3. Scan the library to add the new file to ABS (aka have ABS recognize the file) 4. Check the podcast series and the date will be in the filename but won't be in the episode name in ABS. ### Audiobookshelf version 2.5.0 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:49:40 +02:00
adam closed this issue 2026-04-24 23:49:42 +02:00
Author
Owner

@advplyr commented on GitHub (Nov 24, 2023):

The date has never been parsed from the filename for podcast episodes. The date can be pulled from the date ID3 tag on the audio file.
I'm not sure this is going to be supported but can you share the filename you are expecting to be parsed?

@advplyr commented on GitHub (Nov 24, 2023): The date has never been parsed from the filename for podcast episodes. The date can be pulled from the date ID3 tag on the audio file. I'm not sure this is going to be supported but can you share the filename you are expecting to be parsed?
Author
Owner

@feerlessleadr commented on GitHub (Nov 24, 2023):

Thanks, ABS seems to be at least recognizing the date and episode number in the filename on disk, since it doesn't list that in the episode title on the server itself.

Example - here is my file in disk that I downloaded from YouTube and placed in my ABS podcast folder:

2023-11-20 - EP.0869 - Timcast IRL - Elon Musk LAUNCHES Lawsuit Against Media Matters, Timcast JOINS WAR w⧸Danny Polishchuk.m4a

Here is the episode listed in ABS after a manual scan:

Screenshot_2023-11-24-12-45-40-67_08d3ca09a0478f9a15e1f3e2a616227d

It's identifying the date/episode number and title, but the date and episode number are just getting dropped.

@feerlessleadr commented on GitHub (Nov 24, 2023): Thanks, ABS seems to be at least recognizing the date and episode number in the filename on disk, since it doesn't list that in the episode title on the server itself. Example - here is my file in disk that I downloaded from YouTube and placed in my ABS podcast folder: > 2023-11-20 - EP.0869 - Timcast IRL - Elon Musk LAUNCHES Lawsuit Against Media Matters, Timcast JOINS WAR w⧸Danny Polishchuk.m4a Here is the episode listed in ABS after a manual scan: ![Screenshot_2023-11-24-12-45-40-67_08d3ca09a0478f9a15e1f3e2a616227d](https://github.com/advplyr/audiobookshelf/assets/288895/df643ace-3740-4e61-a66b-bec4d56ed599) It's identifying the date/episode number and title, but the date and episode number are just getting dropped.
Author
Owner

@advplyr commented on GitHub (Nov 24, 2023):

The code isn't removing anything from the filename except the file extension when it uses it as the podcast title. You can check if the audio file has the title ID3 tag set since that would be used over the filename.

@advplyr commented on GitHub (Nov 24, 2023): The code isn't removing anything from the filename except the file extension when it uses it as the podcast title. You can check if the audio file has the title ID3 tag set since that would be used over the filename.
Author
Owner

@feerlessleadr commented on GitHub (Nov 24, 2023):

Ah shit, you're right, my apologies on that!

Is there a way to have the server pull the date from the id3 tag as you mentioned? I can see that it is present in the file in YYYYMMDD format.

 Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: M4A isomiso2
    title           : Timcast IRL - Elon Musk LAUNCHES Lawsuit Against Media Matters, Timcast JOINS WAR w/Danny Polishchuk
    artist          : Timcast IRL
    date            : 20231120
    encoder         : Lavf60.17.100
    comment         : https://www.youtube.com/watch?v=5XWEvYk1CL4
    description     : SUPPORT THE SHOW BUY CAST BREW COFFEE NOW - https://castbrew.com/
                    : Sign Up For Exclusive Episodes At https://timcast.com/
                    :
                    : Merch - https://timcast.creator-spring.com
                    :
                    : Hosts:
                    : Tim @Timcast (everywhere)
                    : Ian @IanCrossland (everywhere)
                    : Serge @sergedotcom (everywhere)
                    : Phil @PhilThatRemains (X)
                    :
                    : Guest:
                    : Danny Polishchuk @DannyJokes (X)
                    :
                    : Podcast available on all podcast platforms!
    synopsis        : SUPPORT THE SHOW BUY CAST BREW COFFEE NOW - https://castbrew.com/
                    : Sign Up For Exclusive Episodes At https://timcast.com/
                    :
                    : Merch - https://timcast.creator-spring.com
                    :
                    : Hosts:
                    : Tim @Timcast (everywhere)
                    : Ian @IanCrossland (everywhere)
                    : Serge @sergedotcom (everywhere)
                    : Phil @PhilThatRemains (X)
                    :
                    : Guest:
                    : Danny Polishchuk @DannyJokes (X)
                    :
                    : Podcast available on all podcast platforms!
  Duration: 02:04:05.06, start: 0.000000, bitrate: 129 kb/s
  Stream #0:0[0x1](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 640x480, 90k tbr, 90k tbn (attached pic)

In the meantime, I'll start adding the date to the title metadata manually so that I can search by name as a workaround.

@feerlessleadr commented on GitHub (Nov 24, 2023): Ah shit, you're right, my apologies on that! Is there a way to have the server pull the date from the id3 tag as you mentioned? I can see that it is present in the file in YYYYMMDD format. ``` Metadata: major_brand : M4A minor_version : 512 compatible_brands: M4A isomiso2 title : Timcast IRL - Elon Musk LAUNCHES Lawsuit Against Media Matters, Timcast JOINS WAR w/Danny Polishchuk artist : Timcast IRL date : 20231120 encoder : Lavf60.17.100 comment : https://www.youtube.com/watch?v=5XWEvYk1CL4 description : SUPPORT THE SHOW BUY CAST BREW COFFEE NOW - https://castbrew.com/ : Sign Up For Exclusive Episodes At https://timcast.com/ : : Merch - https://timcast.creator-spring.com : : Hosts: : Tim @Timcast (everywhere) : Ian @IanCrossland (everywhere) : Serge @sergedotcom (everywhere) : Phil @PhilThatRemains (X) : : Guest: : Danny Polishchuk @DannyJokes (X) : : Podcast available on all podcast platforms! synopsis : SUPPORT THE SHOW BUY CAST BREW COFFEE NOW - https://castbrew.com/ : Sign Up For Exclusive Episodes At https://timcast.com/ : : Merch - https://timcast.creator-spring.com : : Hosts: : Tim @Timcast (everywhere) : Ian @IanCrossland (everywhere) : Serge @sergedotcom (everywhere) : Phil @PhilThatRemains (X) : : Guest: : Danny Polishchuk @DannyJokes (X) : : Podcast available on all podcast platforms! Duration: 02:04:05.06, start: 0.000000, bitrate: 129 kb/s Stream #0:0[0x1](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default) Metadata: handler_name : ISO Media file produced by Google Inc. vendor_id : [0][0][0][0] Stream #0:1[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 640x480, 90k tbr, 90k tbn (attached pic) ``` In the meantime, I'll start adding the date to the title metadata manually so that I can search by name as a workaround.
Author
Owner

@advplyr commented on GitHub (Nov 24, 2023):

Ideally the date format that you would use is the one in the RSS spec https://www.rssboard.org/rss-draft-1#data-types-datetime

However, any date string that can be parsed from the javascript Date object will work. For example, if you used 2023-11-20 it should work. I recommend using the RSS spec though because that is what podcast episodes are required to use.

@advplyr commented on GitHub (Nov 24, 2023): Ideally the date format that you would use is the one in the RSS spec https://www.rssboard.org/rss-draft-1#data-types-datetime However, any date string that can be parsed from the javascript Date object will work. For example, if you used `2023-11-20` it should work. I recommend using the RSS spec though because that is what podcast episodes are required to use.
Author
Owner

@feerlessleadr commented on GitHub (Nov 24, 2023):

Thanks, would I have to add that to the metadata, or somewhere else for ABS to pick that up?

@feerlessleadr commented on GitHub (Nov 24, 2023): Thanks, would I have to add that to the metadata, or somewhere else for ABS to pick that up?
Author
Owner

@advplyr commented on GitHub (Nov 24, 2023):

The date id3 tag like you shared. The one you shared is 20231120 which is not a date format the javascript Date object can parse. If it had hyphens it would work

@advplyr commented on GitHub (Nov 24, 2023): The date id3 tag like you shared. The one you shared is `20231120` which is not a date format the javascript Date object can parse. If it had hyphens it would work
Author
Owner

@feerlessleadr commented on GitHub (Nov 24, 2023):

Got it thanks. Let me look into how I can change that date.

@feerlessleadr commented on GitHub (Nov 24, 2023): Got it thanks. Let me look into how I can change that date.
Author
Owner

@feerlessleadr commented on GitHub (Nov 25, 2023):

Just to close the loop on this for others that may want this - here is how I was able to get yt-dlp to update the date tag in the metadata to include dashes. I included the following in my config file for my yt-dlp script (along with a whole bunch of other yt-dlp options):

--parse-metadata "%(upload_date>%Y-%m-%d)s:%(meta_date)s"

That gives the date format in YYYY-DD-MM format, which ABS is able to pick up, thanks to @advplyr

Best piece of software that I currently use. Similar to my other post, you need to provide us a way to contirbute financially to this project!

@feerlessleadr commented on GitHub (Nov 25, 2023): Just to close the loop on this for others that may want this - here is how I was able to get yt-dlp to update the date tag in the metadata to include dashes. I included the following in my config file for my yt-dlp script (along with a whole bunch of other yt-dlp options): `--parse-metadata "%(upload_date>%Y-%m-%d)s:%(meta_date)s"` That gives the date format in YYYY-DD-MM format, which ABS is able to pick up, thanks to @advplyr Best piece of software that I currently use. Similar to my other post, you need to provide us a way to contirbute financially to this project!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1547