manolomartinez / greg

A command-line podcast aggregator
GNU General Public License v3.0
299 stars 37 forks source link

Changed behavior of {filename_title} using spaces breaks downloading #103

Closed AlmightyFrog closed 3 years ago

AlmightyFrog commented 3 years ago

With the new version 0.4.8 i can't use greg anymore, casue generated filenames even though using {filename_title} which claims to be

    # {filename_title} just like {title}, but leaving only alphanumeric characters 
    # and the underscore, so as to have a sane filename

not containing spaces, now spaces.

This is a bold change in a 0.0.x version. That makes it not only harder to navigate the files on command line, but also beraks my download tooling (youtubedl) which is sad.

If at https://github.com/manolomartinez/greg/commit/b839f8ee9a44100eeffef3ab377ce467702f7a2d line 79 you'd just have not added the " " but instead a "" everything would work fine still. Of cause if you want to keep reduced "" to only one you'd need to process that after line 82.

Could you please at least add something configurable to keep same old behavior in case this behavior is intended and you want to keep it as you find it nicer?

As a quick fix I did want to pin my docker container to always build with greg=0.4.7 only, but as it seems the tracking of loaded files for at least some feeds it also changed, that is also not possible. Therefore i currently do a ugly patch within my Dockerfile like RUN sed -i 's/else " "/else "_"/g' /usr/local/lib/python3.9/site-packages/greg/aux_functions.py but at least now i can used greg again.

AlmightyFrog commented 3 years ago

Update: Seems like while switching forth and back in version or testing or somehow other way (don't know) it broke also some tracking files, e.g. following

v=3YZyKPs81a0 [2021, 3, 7, 14, 0, 13, 6, 66, 0]
v=r9ZTWQtzk2Y [2021, 3, 14, 13, 27, 51, 6, 73, 0]
v=-AAgM6n0tRw [2021, 3, 22, 0, 10, 51, 0, 81, 0]
v=eFrSeppuGZg [2021, 3, 30, 7, 13, 37, 1, 89, 0]
v=KPDjUchKw1I [2021, 4, 9, 13, 2, 51, 4, 99, 0]
{"entrylink": "v=1M84sgLRmF0", "linkdate": [2021, 4, 17, 7, 54, 50, 5, 107, 0]}
manolomartinez commented 3 years ago

thanks, I'll get to this later today or tomorrow.

manolomartinez commented 3 years ago

I've just reverted the offending commit, but let me know if any other issue has bubbled up in the meantime. I will make a bug fix release soon.

manolomartinez commented 3 years ago

Feel free to reopen if the issue has not been solved.