FS#6155 - "oneof" oeprator limited to a list of 3 or less values

Attached to Project: Rockbox
Opened by Reza (afruff23) - Monday, 09 October 2006, 21:29 GMT
Task Type Bugs
Category ID3 / meta data
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


In tagnavi_custom.config, I add this line:

"Electronica Artists" -> artist ? genre @ "Ambient|Big Beat|Breakbeat|Breaks|Electronic|House|IDM|Psychedelic|Rave|Techno|Trance|Electronica|Synthpop" -> album -> title = "%02d. %s" tracknum title

The "@" is the new oneof operator. This does not work, but this line does:

"A" -> artist ? genre @ "Progressive Rock|Trance|House" -> album -> title = "%02d. %s" tracknum title

Judging by the "oneof" patch ( and trial and error, the @ operator does not work with lists with more than 3 values. Could somebody possibly remove this limit or allow the user to set it?
This task depends upon

Closed by  Miika Pekkarinen (miipekk)
Tuesday, 10 October 2006, 10:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  Increased max length to 128.
Comment by Reza (afruff23) - Monday, 09 October 2006, 21:30 GMT
The first line of code is oen line with no breaks and now word wrap in the actual tagnavi_custom.config file.
Comment by Robert Kukla (roolku) - Monday, 09 October 2006, 22:41 GMT
Well, there is no intentional limit in the number of values, but I can confirm the problem. The function seems to return true in all cases for long lists. Which is odd, as it doesn't do it in my testbed outside rockbox. I suspect a buffer overflow and will investigate further.....
Comment by Robert Kukla (roolku) - Tuesday, 10 October 2006, 00:06 GMT
Okay, there is a limit of 32 bytes in the clause string.
Your example has 107 characters. Not sure if it is justifyable to increase the limit and by how much. I have included a patch that changes it to 128 bytes.
Comment by Reza (afruff23) - Tuesday, 10 October 2006, 03:20 GMT
How about let the user choose in the menu? ;)