-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Duplicate logic for formatting human readable file sizes #3419
Comments
Yeah, good point .. we should normalize all the implementation to .. Lines 355 to 364 in e021441
You already mentioned the template .. searxng/searx/templates/simple/result_templates/files.html Lines 38 to 45 in e021441
Haven't look deep, but it seems to me the torrent engines first do calculate from a human readable format to the number of bytes (
Lines 332 to 352 in e021441
|
@return42 added a
humanize_bytes
function in e76ab1a.However I figured out when working on a PR recently, that we already had a similar logic before https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/files.html#L38 used in the
files.html
template - it however covers less cases that thehumanize_bytes
function.We should probably replace the logic in
files.html
with usinghumanize_bytes
.The text was updated successfully, but these errors were encountered: