Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: [fb2k v2] SQLite Utilities (foo_sqlite) (Read 58404 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #200
How do I properly access custom tag fields? If I add a "part" TFExpression with [%part%] to MediaLibrary table to get the value of a <PART> tag I added to many tracks, it always seems to return empty. Do I have to do something else to make the component add those tags to MediaLibrary table?

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #201
How do I properly access custom tag fields? If I add a "part" TFExpression with [%part%] to MediaLibrary table to get the value of a <PART> tag I added to many tracks, it always seems to return empty. Do I have to do something else to make the component add those tags to MediaLibrary table?
There is no need to create a TFExpression column for existing tags. It will only decrease the performance. Just use a normal tag column for it.

Apart from this I see no reason why you always get empty values, if you have your files have values for this tag. It definitely should work without further adjustments.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #202
Hm interesting, it does work with a normal tag. Thx.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #203
It would be amazing if there was some way to use SQLite to generate autoplaylists. Is there a chance for something like this in the future, or is there already some way to do it I haven't noticed cos I'm dumb?

Currently I just know that I can use foo_uie_sql_tree to send SQL query results to a playlist by interacting with the panel.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #204
It would be amazing if there was some way to use SQLite to generate autoplaylists. Is there a chance for something like this in the future
There is absolutely no chance. This is technically not possible.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #205
Well, just to be clear, what I'm thinking of is not to create F2k standard autoplaylists (I know those only work with standard library queries) but rather to automatically fill regular playlists based on SQL queries, without explicit user interaction. The main obstacle I can think of here is the question of how to schedule playlist updates. I don't know how autoplaylists update their contents, and I don't know whether those triggers are also exposed to components, or whether that would even be practical given the performance limitations of SQL requests.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #206
Well, just to be clear, what I'm thinking of is not to create F2k standard autoplaylists (I know those only work with standard library queries) but rather to automatically fill regular playlists based on SQL queries, without explicit user interaction. The main obstacle I can think of here is the question of how to schedule playlist updates. I don't know how autoplaylists update their contents, and I don't know whether those triggers are also exposed to components, or whether that would even be practical given the performance limitations of SQL requests.
Without entering on technical details, that is somewhat possible. Another thing is the conditions required, ensuring it works properly or if that goes beyond the component aim. It can not be an AutoPlaylist. That's true.

But exactly your request is present on my playlist manager, in "Smart Playlists", and they are updated on real time whenever the source changes. In this case they use other playlists as source, and apply a query on them. Such special playlist may also be locked by the component, so it can only be changed by it, whether on demand or by any callback.

If it's possible on JS, it's obviously possible on a component using the SDK, since the callbacks are the same.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #207
I don't know how autoplaylists update their contents, and I don't know whether those triggers are also exposed to components
They are, but the problem is that the information provided by those triggers can't be used reasonably. So, the only information which can be used from this triggers is that something happened.

or whether that would even be practical given the performance limitations of SQL requests.
Not only because of the performance of a single query. Due to the problem of utilizing the information of change events you would need always to execute all defined queries for each change. It might be possible to soften this constraint a bit by providing some configuration options when to execute a query, but it will not really solve the problem.

Without entering on technical details, that is somewhat possible.
No, it's not.

But exactly your request is present on my playlist manager
Not really. It might be the case for certain use cases but in general this is not true.

If it's possible on JS, it's obviously possible on a component using the SDK, since the callbacks are the same.
This is a wrong conclusion.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #208
 ::)  ::)  SMP is exposing callbacks present on the SDK... another thing is you not wanting to open that can of worms, the feature being beyond the component aim or whatever.

But please don't say it is not possible when I'm clearly doing it for some specific use cases (which was the premise of my post anyway). I specifically said they were not going to be Autoplaylists, which clearly means it's not valid for general cases. Anyway that's totally off topic, since clearly the user request is about not having to update a playlist on demand, it may well be enough to have it updated once a day, after startup or whatever.

But it's clearly possible to bind a playlist to a SQL query (within your component scope) and update it with some specific triggers, the same is possible in JS to do it and update a playlist whenever other playlists change. And that's just an example, it can be done by time, on metadb changes, or whatever. A callback not providing the specific change, doesn't mean you can not simply re-update the entire playlist whenever there is a change, even if sub-optimal. Or limit it by a refresh rate. Or keep internal caching of changes for critical things needed. You don't like those approaches, which you are clearly aware about per your post, fine. But It's possible.

Find it funny how many things are "impossible" when we talk about the SDK or native foobar (example), and then the same works fine, with some code logic changes, on JS wich is much more limited and should have lower performance.

 

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #209
Well, just to be clear, what I'm thinking of is not to create F2k standard autoplaylists (I know those only work with standard library queries) but rather to automatically fill regular playlists based on SQL queries, without explicit user interaction. The main obstacle I can think of here is the question of how to schedule playlist updates. I don't know how autoplaylists update their contents, and I don't know whether those triggers are also exposed to components, or whether that would even be practical given the performance limitations of SQL requests.
But exactly your request is present on my playlist manager, in "Smart Playlists", and they are updated on real time whenever the source changes. In this case they use other playlists as source, and apply a query on them. Such special playlist may also be locked by the component, so it can only be changed by it, whether on demand or by any callback.

Oh, I wasn't sure what they do, but I read something in the release notes about support for foo_sqlite stuff. So I guess that's what they're for. I'll take a look in the docs.

They are, but the problem is that the information provided by those triggers can't be used reasonably. So, the only information which can be used from this triggers is that something happened.

Yeah, that was what I was worried about. Running the query on the whole library every time any little thing changes doesn't seem practical.

But please don't say it is not possible when I'm clearly doing it for some specific use cases (which was the premise of my post anyway). I specifically said they were not going to be Autoplaylists, which clearly means it's not valid for general cases. Anyway that's totally off topic, since clearly the user request is about not having to update a playlist on demand, it may well be enough to have it updated once a day, after startup or whatever.

Indeed, some basic options for automatic "send top playlist" conditions would already go a long way as far as I'm concerned.