Page 1 of 1

how can I find out the number of items in database?

PostPosted: Sat Nov 07, 2015 8:53 pm
by willybauss
The DLNA server of my WD MyBookLiveDuo (MBLD) tells me
- Music: 166977
- Images: 30998
- Videos: 167
In fact I have ~12000 images, so I assume the difference to be music album covers etc.

ServiDroid informed me about having ~243000 items added to the database. This number doesn't fit the sum of what MBLD reported. So I'd like to find out what I really have. How can I do that in Serviio, ideally folder by folder.

Re: how can I find out the number of items in database?

PostPosted: Sat Nov 07, 2015 8:55 pm
by willybauss
I forgot to mention: Serviio runs on Windows currently, planned to be moved to Raspberry Pi (Raspbian) soon.

Re: how can I find out the number of items in database?

PostPosted: Sun Nov 08, 2015 2:34 am
by atc98092
The only way you can access the database to close Serviio down completely, then open the DB with a SQL client that works with Derby. I've used Squirrel SQL. I've browsed the DB myself, and you can probably export the listing table to use with Excel to simplify your searching.

Just make certain you don't actually modify anything, or Serviio may not start again. :D

Re: how can I find out the number of items in database?

PostPosted: Sun Nov 08, 2015 7:28 am
by willybauss
SQL sounds pretty simple, since its part of my daily job. But what do you mean saying
... works with Derby...
? Normally I use mySQL or even Microsoft Access as UI, which is also capable of SQLof course.

To be on the safe side I'll take a copy of the database for experiments. I assume the ...\Serviio\library\db\seg0 directory is what I need, right?

Re: how can I find out the number of items in database?

PostPosted: Sun Nov 08, 2015 9:27 pm
by atc98092
I believe you need to direct the client to the root of the library folder, which is C:\Program Files\Serviio\library, but it's been a while and you might need to go one deeper (C:\Program Files\Serviio\library\db). I don't believe Access is compatible with Derby. I also use MySql, but I don't think it has a connection option either. The version of Derby used by Serviio is designed for single access, which is why you can't open it with a client while Serviio is using it.

Using a copy to experiment is a great idea. Besides, you can find everything you want from the copy, so there's no reason to risk the live version.

I think Squirrel (http://squirrel-sql.sourceforge.net/) is your best choice for opening the DB. It's what is recommended by Apache, who develops Derby.

Re: how can I find out the number of items in database?

PostPosted: Thu Sep 17, 2020 1:20 pm
by atc98092
Bitgid wrote:So does some ui exist for it? Because had the same trouble?


No, there's no Serviio UI for accessing the database directly. Using a program such as Squirrel is the only method, but if you don't have a good understanding of databases and SQL I strongly recommend staying out of there. One tiny mistake and the database won't work, and you'll have to remove and install Serviio to clean it up.