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 47495 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #175
Hello, I just found out about SQLite for fb2k, I've been going for months thinking if it's possible to implement a tagging system and a few more other implementations using SQLite, The External Tags plugin for fb2k supports SQLite database so that it can add values to a database... But I'm not sure if there's a way for me to update these tags... Currently, my setup is as follows: Firstly, I use the context menu to edit external tags and set a custom field called FAVOURITE which has a value of ❤ and SQL Console correctly picks up this field...

What I want here is if it's possible to assign a button to run SQLite scripts behind the scenes to tag the currently selected item using Playlist.item_is_selected in an attempt to remove the value in the FAVOURITE field that way it simulates tagging and untagging tracks.

Secondly, I wanted to know if there is a way to have something similar to foo_playcount where you can set the last played and play count fields of a track...

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #176
them. Took a little digging but the component appears coded to look for the documentation in:
AppData\Roaming\foobar2000-v2\user-components-x64\foo_sqlite\help\

However, when Foobar2000 is installed from the Microsoft Store, the equivalent location is actually:
AppData\Local\Packages\Resolute.foobar2000modern_cg7j1awqsza28\LocalCache\Roaming\foobar2000-v2\user-components-x64\foo_sqlite\help
Well, the component actually does not look directly into the mentioned folders. It's using only functions provided by the foobar2000 SDK to identify the component's folder and going further down to the help folder inside of it. Anyway I'll try to track down the problem, if I find the time.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #177
The External Tags plugin for fb2k supports SQLite database so that it can add values to a database...
Just to prevent you from thinking in the wrong direction: You definitely should not access its database with with foo_sqlite. Writing to this database is supposed to be done only by just using tagging means of foobar2000 or relevant plugins. It wouldn't work quite well anyway as the external tags plugin stores the tag data in a binary format.

By the way, foo_sqlite provides also the possibility to store tag data in a database, just with a different approach.

But I'm not sure if there's a way for me to update these tags...
As mentioned above, just use the available tagging means. One of it is to utilize the PlaylistUpdatable or MediaLibraryUpdatable virtual tables of foo_sqlite.

What I want here is if it's possible to assign a button to run SQLite scripts behind the scenes to tag the currently selected item using Playlist.item_is_selected in an attempt to remove the value in the FAVOURITE field that way it simulates tagging and untagging tracks.
That's not possible. However, you could have a look at foo_uie_sql_tree. It allows you to define clickable nodes to execute a sql script, which can do what you want.

Secondly, I wanted to know if there is a way to have something similar to foo_playcount where you can set the last played and play count fields of a track...
No, this is not possible. These information are handled internally by foo_playcount in its own database.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #178
Hey thanks a-lot for pointing out some flaws... Will definitely check SQL trees and try to figure out something.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #179
What I want here is if it's possible to assign a button to run SQLite scripts behind the scenes to tag the currently selected item using Playlist.item_is_selected in an attempt to remove the value in the FAVOURITE field that way it simulates tagging and untagging tracks.
I think easier to use Masstagger if you want a simple tag on/off button.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #180
What I want here is if it's possible to assign a button to run SQLite scripts behind the scenes to tag the currently selected item using Playlist.item_is_selected in an attempt to remove the value in the FAVOURITE field that way it simulates tagging and untagging tracks.
I think easier to use Masstagger if you want a simple tag on/off button.

Hey, I'm currently using that setup... while it's working just as expected it will be better to avoid writing tags directly to files and instead use External Tags or m-Tags. MusicBee has something similar to this called Virtual Tags, was just hoping if we had something similar to this with Foobar?

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #181
^ I think you just answered your own question. I'm under the impression when you create External Tags for an album, all future tagging (including Masstagger) is written to external tags, no? And I believe you can set it to write to SQL database, and take over all tagging operations automatically...

(We're getting off-topic here, best to move any follow-up questions to the correct topic)

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #182
Hi, I'm trying to wrap my head around this plugin, and its usage. I wonder if it is possible to use it to store information per artist and per album (like an internal wiki or reviews database) without writing this information to the audio files itself (and getting it "materialized" in the sqlite db). Thanks for any hints in the right direction.

Re: [fb2k v2] SQLite Utilities (foo_sqlite)

Reply #183
Hi, I'm trying to wrap my head around this plugin, and its usage. I wonder if it is possible to use it to store information per artist and per album (like an internal wiki or reviews database) without writing this information to the audio files itself (and getting it "materialized" in the sqlite db).
Yes, it's possible. Just have a look at the SQLite tag functionality in the help file. It allows you to define, which of the defined tags should will be written only to the db and which will be also written to the file. Additionally you can define lookup tables for the artist and album tags containing the tags for the relevant information.