text_length setting doesn't work correctly
https://github.com/DIGITALCRIMINAL/OnlyFans/blob/00f3f3d190c0eace8177f0fca36387ca878e20aa/helpers/main_helper.py#L253 https://github.com/DIGITALCRIMINAL/OnlyFans/blob/00f3f3d190c0eace8177f0fca36387ca878e20aa/helpers/main_helper.py#L268-L274
maximum_length is initially set to the value of the text_length setting.
I'm not sure what the goal was here, maybe to limit the entire absolute path? But text_length should only limit {text}, right?
The way this is currently, this does not limit the length, but rather cuts a fixed bit off at the end with a negative slice if maximum_length = text_length is smaller then the absolute path.
If text_length should do what the readme says, then maximum_length should not be modified.
If text_length should limit the complete filename, not just {text} the calculation should be more like this:
text_limit = max(0, text_length - len(path) + len('{text}'))
filtered_text = text[:text_limit]
Because path seems to be just the templated filename, not the complete path
I am also having text length problems
I set it to 110 but it doesnt cut anything off at all - and I get all smilies and emojis and all kinds of chars into the text now - using 6.1.2
I am also having text length problems
I set it to 110 but it doesnt cut anything off at all - and I get all smilies and emojis and all kinds of chars into the text now - using 6.1.2
Don't use text if you don't want emojis, omegalul
lolz fine
https://github.com/DIGITALCRIMINAL/OnlyFans/blob/00f3f3d190c0eace8177f0fca36387ca878e20aa/helpers/main_helper.py#L253
https://github.com/DIGITALCRIMINAL/OnlyFans/blob/00f3f3d190c0eace8177f0fca36387ca878e20aa/helpers/main_helper.py#L268-L274
maximum_lengthis initially set to the value of thetext_lengthsetting. I'm not sure what the goal was here, maybe to limit the entire absolute path? Buttext_lengthshould only limit{text}, right? The way this is currently, this does not limit the length, but rather cuts a fixed bit off at the end with a negative slice ifmaximum_length=text_lengthis smaller then the absolute path.If
text_lengthshould do what the readme says, thenmaximum_lengthshould not be modified. Iftext_lengthshould limit the complete filename, not just{text}the calculation should be more like this:text_limit = max(0, text_length - len(path) + len('{text}')) filtered_text = text[:text_limit]Because
pathseems to be just the templated filename, not the complete path
Thanks for reporting this.