Closed josswright closed 7 years ago
I think I am reluctant to make this sort of change. As you say, a two-line script as download handler should be enough for this use case. Or am I wrong about this?
I use a download handler script to add downloads to playlists, among other things. There is already the ability to pass almost any relevant information about an entry to an external script through the download handler function with placeholders, which makes handling entries pretty versatile. Wouldn't adding that kind of scripting capability internally to Greg just be redundant?
I've been thinking for a while it would be useful to have a "useful recipes" wiki page for this sort of thing. I've gone ahead and created one. Could you @FilipBB post (a version of) that script under the relevant section?
I'm closing this as wontfix for now, if I am missing some reason why downloadhandlers are not enough, feel free to reopen it.
No objection here. I think, on balance, that there's no good reason to have this included when a download handler can manage it.
Is it possible to provide a few more downloadhelper examples?
I am trying to generate something that is relatively simple, but am struggling to make it work. I would like to have a file of the format {date}-{filename}.mp3 where {date} no longer contains hyphens, i.e. 20161001-{filename} rather than 2016-10-01-{filename}
I have tried (a) bash, ${date//-/} (B) python re.sub('-','',{date}), but can't get the right combination. I also tried date_format = %%Y%%m%%d, but that threw an error when I tried to tag the files.
Thanks for any help!
Hi, date_format=%Y%m%d
(only one % each time) should work. If it does not, please open an new issue and I'll look into it.
Thanks, Manolo
I added a couple of examples of download handlers to the wiki, hopefully it gives people some ideas on how to use them.
This is probably possible by playing with the download handler, but it would be useful to have a post-download action for files. I can imagine all sorts of uses for this, but my planned use was so that new episodes could automatically be added to the playlist of an external player.