Latest restricted WACUP beta release is build #18654 (March 24th 2024) (x86 & x64 changelogs) | Latest WACUP public preview is build #17040 (September 30th 2023) (x86 only)


NOTE: Beta testers are added in a limited & subjective manner as I can only support so many people as part of the beta test program to keep it useful for my needs.

Unless I think you're going to be helpful, not all requests will be accepted but might still be later on. Remember that beta testing is to help me & the limitations currently works for my needs for this project.

Author Topic: It is possible to do queries to WACUP database?  (Read 1478 times)

araxhiel

  • Beta Tester
  • Jr. Member
  • **
  • Posts: 5
    • View Profile
It is possible to do queries to WACUP database?
« on: August 10, 2021, 04:09:36 AM »
Hi,

As title says, I have been wondering for a while if there's a way to do some direct queries to WACUP's database and be able to extract some data and use it externally.

My current scenario is that, after a couple of years where I was mostly using Spotify (you know, to have something to listen to on my work place) I have created a good deal of different playlists that only exists on that platform. So, I want to be able to locally "recreate" some playlists that I have over Spotify, but with the files already on my media library (as most of the playlists that I want to recreate are reproducible using my local files).

So... I have already developed something to retrieve all my Spotify data, and whatnot, but now that I am facing the issue of scanning/reading all my local library in order to be able to recreate those playlists using my local files, and that's where the main question takes relevance:

As I already "have" something that already contains all my library's data, I was thinking into not reinventing the wheel and reuse that already available data source.

I was somewhat aware since the old Winamp days there were a couple of projects that were able to read Winamp's database (I was a lurker at old Winamp forums - lol), and, actually, after digging a little bit I was able to found some stuff from back then (some java, and javascript stuff), but being honest, it is pretty old stuff and 1) I don't know if that stuff worked to begin with, 2) don't know how different is the current database format compared with the old one.

Yeah, I'm probably being very, very lazy (ha!), and perhaps I should look at other solutions, but I though that it was worth to ask and see if it is possible to achieve (I mean... I think that it would be cool to have everything integrated, to be honest).

Any comments, suggestion, or advice is welcome.

Thanks in advance.

Kind regards.



P.S. Sorry for all the grammar mistakes that are present.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4428
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: It is possible to do queries to WACUP database?
« Reply #1 on: August 10, 2021, 03:08:53 PM »
My NDE implementation is different enough to prevent those old tools from working which is why I've got some basic helpers to avoid needing them.

Currently there is either using the export feature if it's installed which can be found via the library window button or the main window file sub-menu (if using a modern skin) or via the /export* methods (see the wacup.exe /? command-line help) which may not match up exactly as I've still to finish merging the test code that was used for the /export* methods vs the more fleshed out handling the plug-in & it's export actions offer.

Those actions offer dumping things to txt, m3u, m3u8, pls & for a more complete output of all of the metadata stored to csv (I've got it on my todo list to have it dump it as json).

[edit]
The plan is also to make it possible to send a custom query to the db via the command-line & the next wacup build when using ml_ll (wacup's implementation of the local library plug-in) will also offer a means to export the current view results to csv which might be a bit easier to use as it'll only dump what is configured to be seen in the view.

-dro
« Last Edit: August 10, 2021, 03:22:14 PM by dro »

amix

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: It is possible to do queries to WACUP database?
« Reply #2 on: October 09, 2021, 09:22:02 PM »
Quote
The plan is also to make it possible to send a custom query to the db via the command-line

It would be even cooler, if this could be done via ActiveX scripting, meaning, that WACUP could be used as a COM for ActiveScripting.
Greetings, Andreas