podget is unable to download episodes from this feed:
https://itunesu.itunes.apple.com/feed/id420535283
because it tries to create filenames which exceed the filesystem limits:
$ podget -s
/home/francois/podcasts/Arming_the_Donkeys/9012cbd2-448e-5575-14c2-b934d12cd669_2f47b7bb0b9e19e00d2ad95bc932b5f53d127fdd269068496eb59cdca8bf9587-1584504094?a=v%3D3%26artistId%3D420416991%26podcastId%3D420535283%26podcastName%3DArming%2Bthe%2BDonkeys%26episodeName%3DWhy%2B%2522Arming%2Bthe%2BDonkeys%2522%253F%26episodeKind%3Depisode%26pageLocation%3Ditc.mp3: File name too long
It appears that Apple has created a solution that doesn't adhere to the standard file naming structures that other podcast feeds do.
If we look at this URL...
Filename: 9012cbd2-448e-5575-14c2-b934d12cd669_2f47b7bb0b9e19e00d2ad95bc932b5f53d127fdd269068496eb59cdca8bf9587-1584504094
Other ID for their software tools: a=v%3D3%26artistId%3D420416991%26podcastId%3D420535283%26podcastName%3DArming%2Bthe%2BDonkeys%26episodeName%3DWhy%2B%2522Arming%2Bthe%2BDonkeys%2522%253F%26episodeKind%3Depisode%26pageLocation%3Ditc.mp3
This is a very challenging setup to work with and produce a meaningful filenames.
We could just cut & discard everything after the '?' but that leaves us with semi-random strings for filenames. Not helpful.
What we appear to want is the segment immediately after the 'episodeName%3D'. In this case "Why Arming the Donkeys". Then we we would need to convert out the '%2' for spaces (and other formating characters) to create meaningful filenames.
The segment that we want appears to end at '%26episodeKind%3'. So we may be able to search for it.
And this files appear to mostly be MP3 files so we would need to add that to the end of the filename.
I'll look into it and see what I can do.
Yeah, it's pretty gross.
I guess a semi-random name is not all that bad because the final filename will at least have the name of the podcast. It's certainly better than the file not being saved due to the long name :)
An alternative could be to ignore the entire name sent by Apple and replace it with a timestamp? So that the final filename would look like "podcast_name.20140322T093500.mp3".
OK, after a couple hours of hacking I think I have made some progress on a workable solution.
So far it only works for MP3 files done in the format of the ITunes feeds. So it will need to be updated or forked if anyone wants to get MP4, AVI or other file formats.
I've managed to extract the episode name from each URL, so I think that will make a much better filename than a semi-random string or datestamp (while usable, its not very descriptive and it got repetitive in my testing).
I want to do a little more testing but I will post this soon in the next version (0.6.16). When you download/install it, you will need to make one small change to your ${HOME}/.podget/podgetrc file. You will need to add a line below the existing filename format fixes:
filename_formatfix10=1
And you may need to edit the "done" log file where ever you have it stored to delete all of the URLs that failed to download but were marked done. Just remove them from the file and save it. Then podget will try to download them fresh and won't skip them because it thinks they're already done. By default the LOG directory is inside where-ever you store your podcasts, so for me it is ${HOME}/POD/.LOG/done.
I'll leave this support ticket open until I upload an updated version, but don't worry it should be soon!
OK, I just uploaded 0.6.16 to the files so it's ready to be downloaded. If you do install it, you will need to add filename_formatfix10=1 to your podgetrc file. Once that's done, it should download the files from this feed and save them with reasonable filenames.
Enjoy!
Is there documentation on the various formatfixes available? I've been running with filename_formatfix=1 but just recently I started getting npr podcasts with names like npr_379626985?orgId=1&e=379626985&d=3225&ft=pod&f=510208.mp3 that won't copy to a vfat mp3 player. I'll try filename_formatfix10=1 but it makes me wonder if I should also enable formatfixes 2 through 9 just in case.