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
Bitrate filter does not work as expected #2141
Comments
The bitrate filter has already been revised in 3.3.0dev1, see #1892.
Yes, multiple conditions are possible to specify a range now with the Please can you review the behaviour in the latest unstable build of Nicotine+ and we can go from there. Changing from Bug to Enhancement, since it is debatable as to what the expected behaviour of the
Whilst this would make sense for the integer values of Bitrate, it would not work for the Size and Duration filters because applying the same logic there (and indeed the same logic is actually used for all three filters) would wrongly exclude files that are infact only a decimal fraction more/less than the input specified. |
Hmm. But "AND" is not supported for bitrates? I tried with
Sure. I tried the flatpak linked in TESTING.md and am seeing the same behavior.
So you're saying that an input like |
In the context of the filter functions AND is OR so the seperator used is the Admittedly more characters other than For the sizes I made it so that values which are converted from Bytes into MiB are approximated to with 0.125 of a unit, because otherwise getting or hiding any results with the For the duration I suppose one would consider the example It seems a reason why |
@defaultxr Are you able to clone this development branch for testing? If possible, your feedback on this would be most welcome before PR #2238 is considered for merging into master.
|
Sure. Testing as per your instructions and the bitrate filter definitely looks like it's working how I expected it to. Makes it a lot easier to find V0 mp3 in search results and such. I would be very pleased if this behavior became the new standard behavior in the master branch. |
Thanks @defaultxr that's good to hear. I have further refined the syntax to enable any amount of spaces, ampersands or pipes can be entered between multiple filter conditions without breaking the field or creating duplicate history entries with different ||| spacing as it was doing before. Also, now one space after an operator can be entered before the digit without it being orphaned, allowing for a much more flexible syntax. To test, update the development branch with:
|
That seems to work as well; |
No, that's right. This behaviour has not changed since the numeric filters have had ability to concatonate multiple conditions together, the
Agreed, while there might be a valid reason for excluding a range in some edge case scenario, it would require somebody much smarter than myself to work on this, and I don't think the extra complexity that would be needed is warranted, because the |
Makes sense. Then I would say the current behavior on this branch definitely seems good to me. |
@defaultxr The development branch is just updated again, perhaps it will be the final testing of the space seperators before merging it into master.
|
Tested, and it looks good to me! 👍 Looking forward to the official release with it :) |
@defaultxr After review discussion in #2238 it is changed slightly again, update with
What this means is that if you filtered for example Whereas now, only files that are 1 Kbps or more are shown when using the filter. Hopefully this doesn't break anything. |
Pulled and tested, and the bitrate filter still seems to work as expected. I also tested filtering by length and it looks like that is working for me as well. |
What do you think of the factory presets in the combobox?
Maybe the last one should be >= |
My intention was to have a filter for lossless files, hence |
Indeed, and that is a good idea, however if one considers anything that is 320Kbps or above to be a minimum standard, then there is no preset for that in the proposed list of factory Bitrate presets. |
I would assume people either want lossless or not, depending on if they care about quality or disk space. For a high quality filter containing both lossy and lossless files, >=320 isn't that good today, when you have newer audio formats with equivalent quality at a lower bitrate. |
That is true, however on the other hand since recent versions of LAME encoding, when used for electronic genres which are popular with our users such as house and techno, then 320Kbps MP3 files are considered to be indistinguishable from lossless, even on high end sound systems. The fact remains that many older models in the CDJ range are still in use and they only support either MP3 or WAV, not FLAC. I am concerned that if any users have Suggest: An obviously different digit, such as >512 or >768 for example, would avoid any doubt if the value 320 is inclusive or exclusive. |
If you're asking me, I think having one for mp3 V0 files would be nice. I usually search Otherwise, I pulled again and checked and everything still seems to be working fine for me. |
|
@slook This works for me.
I don't think this will be a large issue, considering |
Nicotine+ version: 3.2.2
Operating System/Distribution: Arch Linux
Describe the bug
The "Bitrate" results filter does not seem to work as expected:
<320
and pressing enter should hide all results with bitrates of 320 or above. But 320kbps mp3s are still visible.>192
and pressing enter should hide all results with bitrates of 192 or below. They are still visible though.>192 <320
and pressing enter should show only results with bitrates above 192 and below 320. Again, this is not what happens.It seems that Nicotine+ is interpreting
>
as>=
and<
as<=
, since<319
seems to hide 320kbps results as expected;>193
also seems to hide 192kbps.However, then I would expect a query like
>193 <319
to hide 320kbps and 192kbps results. Instead, I still see them. Is it possible to filter to a specific range?Maybe I am misunderstanding how this filter works; if so, a more informative tooltip may be helpful. I could've sworn previous versions had a better tooltip but in 3.2.2 it just says "Bitrate" when I hover my mouse over the input field.
Either way, the bitrate field has always felt a bit buggy.
Expected behavior
>
and<
operate as greater then/less than, rather than greater than or equals/less than or equals.AND
-ed together like they are in the other filters.Steps to reproduce the bug
Additional context
Let me know if you need any other information.
The text was updated successfully, but these errors were encountered: