ben-xo / dir2cast

Turn a directory of MP3s into a podcast - automatically.
http://www.ben-xo.com/dir2cast
BSD 3-Clause "New" or "Revised" License
155 stars 22 forks source link

file ordering in xml file #44

Closed DickManhard closed 3 years ago

DickManhard commented 3 years ago

There doesn't seem to be any ordering in the generated dir2cast XML file. When generating a podcast or audiobook rss, it would be nice to have them in title/track order or something like that. Instead, the XML file lists the mp3s in no particular order.

ben-xo commented 3 years ago

Hi @DickManhard ,

The ordering in the feed is based on the dates the files were added to the folder. You should upload the files in the order you wish them to appear in the feed, newest last. (This corresponds to the original intended use-case, which is for publishing episodes one at a time).

If you have an entire series ready to go in one go, I appreciate that this might be a little trickier to set up. If you're not comfortable using tools such as touch to fake the "modification" dates one by one, then other ways to do it include:

If for some reason none of these are possible them I apologise that your use case isn't yet supported. Whilst I'd be interested to know why this isn't possible, I could add a new configuration setting to allow a different method of publishing.

However, please be aware that Dir2cast is quite reliant on file modification dates to determine if it needs to refresh the feed, and to determine if it needs to re-scan the contents of the files. (If you accidentally do any of the above on pre-existing files, it will bump them to to the top of the podcast).

DickManhard commented 3 years ago

OK, that makes sense. I'll try to mod the dates and re-scan. Thank you for your time.

ben-xo commented 3 years ago

@DickManhard if this solves your problem (or, if it does not), either way I would appreciate you leaving feedback here so we can close the issue. :) thanks!

DickManhard commented 3 years ago

Works fine with the touch program to modify audiobook chapters in reverse order.

ben-xo commented 3 years ago

Works fine with the touch program to modify audiobook chapters in reverse order.

I appreciate you confirming the outcome!

stirtingale commented 1 year ago

I realise this is closed but I found it fairly annoying to have to loop through a big library of content and manually update each folder

This is a simple recursive script that will loop through every sub-folder in a directory ( i.e. /audiobooks ) and will updated the modification times using touch

https://gist.github.com/stirtingale/2d66ec6a0557267a2238e59f455efd59

It will respect numeric ordering ( i.e. if it is 001.mp3, 099.mp3, 100.mp3 ).

Hopefully helpful to anyone who has found this thread by Googling how to sort by filename!