Prev Previous Post   Next Post Next
Old 16th April 2007, 16:51   #1
mlipod moderator
(Senior Member)
abu's Avatar
Join Date: Jun 2005
Location: Germany
Posts: 3,457
API request: Use query engine on external itemRecord

Hi, dev gurus,
I would like to be able to use the Winamp query engine on itemRecords for a file that is not in the ML. I would fill out the itemRecord struct with all the data (basic and extended data), and then call a API function with a query string and a pointer to this itemRecord. Return value would be 1 if the item matches the query rules, 0 if not, -1 if the query is invalid or any other error.

typedef struct
char *query;
const itemRecord *ir;
} mlQueryRecordStruct;

#define ML_IPC_DB_RUNQUERY_ONRECORD 0x704 // pass mlQueryRecordStruct*

I'm sure Will will need sth. like this sooner or later for pmp_*, too (if he wants to support smart playlists)

Would that be feasable?

An second approach could be to pass in an itemRecordList, and the API call marks all items that match (it could add the indexes for matching items to a new C_ItemList, for example). That would help if you need to query thousands of tracks, it would be only one call, not thousands...

Would be really great if that could be provided. The query engine is simply too good to leave it for the ML alone

WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it)
ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug?
Donations to support the ml_iPod project can be done HERE
abu is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump