Missing albums

Need help? Post your questions here.

Moderator: moderators

Missing albums

Postby dkl » Fri Dec 03, 2021 12:20 pm

Hello,

I'm using subsonic on a RPI4 (10/Buster).
Subsonic version is: 6.1.6 (build 0cfa60) – November 10, 2019
Server: jetty-6.1.x, java 1.8.0_212, HSQLDB, Linux (102.3 MB / 181.9 MB)
I have a premium license.

I have quite a large collection of music, attached to a USB HD on the RPI:

1,728 artists
6,373 albums
118,075 songs
2384.03 GB
7,953 hours

My main issue is that several albums are missing, i.e I don't see them in the Web UI, and thus cannot play them :(...

I have checked that the rights on the files are correct.

First question: could I simply have a list of all albums in the DB? The DB is the standard one (HSQL). This would help me to check how many albums are missing, by comparing with what is present on the HDD.

Second question: what could be the cause of these missing albums? Again, I have checked the file properties, everything looks OK. I am facing a size limitation of the DB? Apparently, news albums appear with no problem.

I have tried to clean and recreate the DB => same situation.

Third question (maybe an easy one): the log file (/var/subsonic/subsonic.log) is empty. I can see the log in the WebUI (About Subsonic), but the file remains empy.

I have tried to receate the file today, no success:

Code: Select all
/var/subsonic# ls -l
total 792
drwxr-xr-x  2 subsonicuser         1002   4096 Dec  3 12:31 db
drwxr-xr-x  2 subsonicuser root           4096 May 13  2020 db.backup
drwxr-xr-x  2 subsonicuser root           4096 May  6  2020 db.ori
drwxr-xr-x  2 subsonicuser subsonicuser 106496 Nov 19 13:30 fanarttvcache
drwxr-xr-x  3 subsonicuser subsonicuser   4096 May 13  2020 jetty
drwxr-xr-x  2 subsonicuser subsonicuser   4096 May  9  2020 lastfmcache
drwxr-xr-x  2 subsonicuser subsonicuser 503808 Dec  3 12:35 lastfmcache2
drwxr-xr-x  7 subsonicuser root           4096 May  6  2020 lucene2
-rw-r--r--  1 subsonicuser subsonicuser      0 Dec  3 12:17 subsonic.log
-rw-r--r--  1 subsonicuser root           1469 Dec  3 12:35 subsonic.properties
-rw-r--r--  1 subsonicuser subsonicuser 143391 Dec  3 12:44 subsonic_sh.log
drwxr-xr-x 14 subsonicuser subsonicuser   4096 Dec  1  2020 thumbs
drwxr-xr-x  3 subsonicuser root           4096 May 13  2020 transcode
drwxr-xr-x  2 subsonicuser root           4096 May  6  2020 transcode.ini


Thanks for your help.

Denis
Last edited by dkl on Sun Dec 05, 2021 12:30 pm, edited 1 time in total.
dkl
 
Posts: 22
Joined: Sat Oct 03, 2015 9:28 am

Re: Missing albums and empty log file

Postby J_T_W » Fri Dec 03, 2021 6:16 pm

Navigate to http://[YourSubsonicUrl]:4040/db.view

Query: SELECT * FROM ALBUM

https://www.reddit.com/r/subsonic/comments/7c2n6j/database_table_schema/
J_T_W
 
Posts: 93
Joined: Fri May 03, 2013 2:13 pm

Re: Missing albums and empty log file

Postby dkl » Sat Dec 04, 2021 10:23 am

Thanks for the help.

I get, of course, a gigantic table displayed in my web browser.

Is there any simple way to dump this into a file?

Thanks again

EDIT: found a workaround. I am moslty interested in the list of albums, so:

1) SELECT PATH FROM ALBUM

2) "Save as" the HTML page => I get a text file with all HTML stuff

3) and then using Emacs, keep only the information I need (the actual pathes).

Not straightforward, but I think it will make the job

Denis
dkl
 
Posts: 22
Joined: Sat Oct 03, 2015 9:28 am

Re: Missing albums and empty log file

Postby dkl » Sat Dec 04, 2021 4:20 pm

Finally, I have installed MariaDB on the same RPI and rebuilt everything on this. Much easier to generate dumps into files from mySQL...

I have checked that all directories I can find on the file system are present in the "media_file" table. That's a good point.

But if I look into the "album" table, several are missing in the list exported from mySQL, although there are present in subsonic (I can play them). I don't understand this...

My figures are now:

1,728 artists
6,370 albums
120,845 songs
2426.44 GB
8,111 hours

So less albums (6370 versus 6373 - I have corrected a couple of wrong pathes in the mean time), but more tracks/songs (120,845 / 118,xxx).

Still not clear how I can have more songs (almost 3000 more) with the same number of albums....

EDIT: my logfile issue is solved (it was empty...). The owner must be subsonicuser:root.
I changed the title
dkl
 
Posts: 22
Joined: Sat Oct 03, 2015 9:28 am

Re: Missing albums

Postby dkl » Mon Dec 06, 2021 2:44 pm

Hello,

I must say I am a bit confused with the DB model, and specially the "album" table.

As I said, I checked that some entries are missing in this table, while the "media_file" table contains them. And I can acces them in the Web UI.

Now, I have also checked that when I "star" an album in the webUI, it appears in the "starred_media_file" table, not in the "starred_album" one:

After "starring" one album:
Code: Select all

MariaDB [subsonic]> SELECT * FROM starred_media_file;
+----+---------------+----------+---------------------+
| id | media_file_id | username | created             |
+----+---------------+----------+---------------------+
|  1 |         96638 | denis    | 2021-12-06 15:20:29 |
+----+---------------+----------+---------------------+
1 row in set (0.001 sec)

MariaDB [subsonic]> SELECT * FROM starred_album;
Empty set (0.000 sec)

MariaDB [subsonic]>



Why is it so? It seems that the "album" is referred through its media_file_id, not is "album_id.

Is the "starred_album" table useless, or deprecated?

Is it important that the "album" table does not seem to be properly updated, while the "media-file" is complete?

Thanks for your help.

Denis
dkl
 
Posts: 22
Joined: Sat Oct 03, 2015 9:28 am

Re: Missing albums

Postby acroyear » Mon Dec 06, 2021 7:12 pm

There's 2 data models for Subsonic - ID3 (tag based Artist, Album, Song) and MusicDirectory (Directory -> ... -> Song). The Songs are the same in both, and their data model has both parent musicDirectory (which has a parent and more ancestors depending on your setup) AND the album and artist.

In the API Song and MusicDirectory are two different things. In the data model, it was always just MEDIA_FILE for both (ID3 support came much later), and musicDirectories simply ignore certain fields.

Star in the main UI ONLY stars the music directory and/or the song - that is, only the MEDIA_FILE in MEDIA_FILE_STARRED. The API supports a star for album and artist that you can see in the data model, but the UI does not.

The UI makes some presumptions, that the musicDirectory for a song is the album for it, and the grandparent is the artist - this would be a typical setup if your subsonic instance pointed to your itunes folder (give or take compilations). It makes guesses as to the artist or album for liner notes from last.fm. However, that can get fooled if your layout is different - e.g., when you have subfolders of CD1 and CD2, or your artist block has subdivisions (e.g., i wanted to separate Studio from Live for some artists like Rush...which means that the main UI is telling me there's no band named 'Studio', and the info on the 90s band named 'Live'. Oh well. I learned to just ignore it.

So really if you're looking for 'star' status or anything else strictly through the DB, to be seen in the main UI, you'll need to work with MEDIA_FILE and MEDIA_FILE_STARRED for everything.

Only apps (and the front page album listing...kinda sorta) cares about albums/artists via file tags. SubFire's apps respect both ways of browsing. Not all of the others do. Some only look at Artist/Album tags. Others only look at the music directories (media_file).
--
Joe Shelby
http://subfiresuite.com/
http://subfireplayer.net/
User avatar
acroyear
 
Posts: 779
Joined: Wed Mar 27, 2013 8:05 pm
Location: Northern, VA

Re: Missing albums

Postby dkl » Tue Dec 07, 2021 11:10 am

Hello,

Thank you VERY much for the time taken to answer to me. This clarifies a lot and gives answers to most of my open questions.

I still have one: what about the "RANDOM" function? Does it return items from MEDIA_FILE, ALBUM, or both?

Denis
dkl
 
Posts: 22
Joined: Sat Oct 03, 2015 9:28 am

Re: Missing albums

Postby acroyear » Tue Dec 07, 2021 10:40 pm

random is a setting in the getAlbumList and getAlbumsList2 code. getAlbumList returns musicDirectory. getAlbumsList2 returns Album (id3).

so as with the above, if you have "CD1" and "CD2" folders, getAlbumList is going to treat them as separate entries. getAlbumList2 will join them, provided their names are the same.

vice-versa, if your tags have the album named "Best of (disc 1)" and "Best of (disc 2)" yet in the same folder - getAlbumList2 will separate them, while getAlbumList1 will unite them.

yeah, weird, but there we are.

getRandomSongs doesn't care - Songs are song (api) / media_file (database model).

what the random does in the main UI? that's a little funky - i think it is ID3 based...mostly. of note, importing a lot of things at once, and some things might not appear there even though they're in the data model. never quite figured all of those nuances out.
--
Joe Shelby
http://subfiresuite.com/
http://subfireplayer.net/
User avatar
acroyear
 
Posts: 779
Joined: Wed Mar 27, 2013 8:05 pm
Location: Northern, VA

Re: Missing albums

Postby dkl » Thu Dec 09, 2021 6:35 pm

Thanks for all this Joe. I suspected it was not so simple.... and you confirm it.

Denis
dkl
 
Posts: 22
Joined: Sat Oct 03, 2015 9:28 am


Return to Help

Who is online

Users browsing this forum: No registered users and 5 guests