-
Notifications
You must be signed in to change notification settings - Fork 37
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
Request: configurable filenames #83
Comments
I was able to get halfway to what I want with
but it doesn't know about the track number and if any podcast doesn't podcast in mp3 this will be wrong, and wget apparently doesn't respect -P when used with -O. |
I'd also second the need for this, since a few of the feeds I subscribe to have (apparently) started naming all of their files "audio.mp3" which means that, by default, greg pulls down a bunch in the same per-feed directory and starts stacking underscore after underscore after the '3' on the extension, which in turn makes the files not recognized as audio by some (admittedly naive) utilities. |
|
Oh amazing, I didn't think to try it that way. Thanks albang!! ⭐ |
Hmm. This does not work if you enable |
Doesn't
|
Well, the feed has since died, and it doesn't look like it's going to come back, so it's hard for me to test. I have used file_to_tag just fine in other feeds; if anything in the feed was causing the issue, I suspect that it was special characters in the filenames (I recall it had segments that were clearly cloudflare/CDN URLs that had been sanitized ... if imperfectly). That said, can't |
The discussion above provides an example: if you use |
I'd also like to emphasize the need for both these things. There's no good way around the file extension issue or the index issue without writing my own code. I could make a special download handler that strips off the extension from the original filename and then renames it, and I could count the number of files in the folder and increment by 1 since Greg downloads in reverse order, but neither of these things are possible directly with wget. I have a working copy of Greg from 2016 which has a {filename_template} placeholder, and it's extremely useful for downloading different podcasts with different filenames. Sometimes the default one is sufficient, sometimes the title works best, and other times it makes the most sense to just add a date to the beginning so they remain in chronological order. I'd love for this all to be integrated so I don't have to write an external downloader or keep adding my own code, and I know not everyone knows how to do either of those things. Also, thanks for this project; I spent a good long time looking for a way to hoard podcasts locally and this is working well. |
Could those interested in having configurable filenames please check if this PR works for them? |
As far as I can tell, the current logic for picking filenames is roughly
All the CD rippers I've used, and also EasyTag, let me normalize filename formats using variables. There's a comment in the config file "# {filename} the name of the file to be downloaded (which need not be the name under which you will save it locally)" which sounds like it is implying I should be able to do this with greg, but I can't figure out how to change the local filename, and unless I'm misreading the code badly this logic insists
filename == link.split("/")[-1]
(ii.e.$(basename $link)
) and gives no way to change it.I would like a new config option
filename_format
with defaultI would also like a new variable
{n}
for the podcast entry's ID number, and{-n}
for the podcast entry's ID in reverse -- that is, counting from the start of the podcast -- that is, like its track number; for podcasts like history and audiobooks it is really important to be able to number them in order like this:The text was updated successfully, but these errors were encountered: