v18 Chorus2 doesn't load albums
#1
Hi everybody,
so I have a problem with webui in Kodi.
What's worse it's independent from the ui I pick up.
The thing is that in the web interface there are sometimes situations where artists doesn't list any albums/songs but the play button is active and what's surprising, when I click it, it will start playing all the songs from the albums that are from this artist.
Of course there's no such problem in kodi desktop/tv interface as also no problems with the mobile app. Yet since I  control kodi from within my laptop it's a big problem right now.
I've done some checks and in debug log I saw some sql queries where performed yet, not all of them. From what I understand there's a query per album when I try to display artist albums (a bit odd, why not one query? but it's another story), so for the artists that there are no albums displayed at all I can see only few of the queries, say that artist has got 10 albums I see only 6 queries.
Of course I can find the album normally, play it and then click on the artist name to get back to the artist albums but the list is empty.
In the browser console I can also see some problems:
Code:
uncaught exception: Error code: -32603 - message: Internal error. 2 kodi-webinterface.js:9:2996
Which doesn't show up for artists that I can see all of the albums.
This doesn't have nothing to do with character encodings, because the artist albums and song doesn't use any diacritic characters opposite to artist who's albums are loading perfectly fine.

Question no. 2:
is there an option to use case insensitive search in chorus2?
#2
I've been able to create a test case music using example from https://www.soundhelix.com/audio-examples filling up tags. I've used only the first file copy it into few directories.
Long story short is that it seems the GetAlbumPaths doesn't access a situation when we have structure like:
Code:
Artist
 | - album1
 |      | - file1.album1
 |      | - file2.album1
 | - otheralbum
        | - file1.album.single
        | - file2.album.next
        | - file3.album.future

having such structure works ok in kodi gui but chorus won't show those album for the artist. It's because it's using the GetAlbumPath which has got buggy query because of this query clause:
sql:
(SELECT COUNT(DISTINCT(idAlbum)) FROM song AS song2WHERE idPath = song.idPath) = 1
the solution is to use the same thing as kodi gui which is: GetAlbumsByWhere
#3
Any news regarding this problem?
#4
Chorus2 is currently unsupported. The person that was working on it went AWOL some time ago, and no one has volunteered to take up maintenance and future development, which is a shame but with such a small active dev team there is nothing we can do but wait for a volunteer.

My main area of interest is the music library, since you are using Chorus2 to play music I will try to help. However I don't seem to be able to reproduce your problem. You don't mention what version of Kodi you are using and do not supply a debug log, so I experiment with current v19 master and v18.x-2.4.6 of Chorus2 addon. Having synced with the library when I click on an artist, I see all the albums.
 
Quote:I've done some checks and in debug log I saw some sql queries where performed yet, not all of them. From what I understand there's a query per album when I try to display artist albums (a bit odd, why not one query? but it's another story)
You don't provide the log, I can't guess what you are seeing. Chorus2 uses JSON API to request library data, turing on logging of that component could be informative.

Since you ask the query per album is possibly Chorus2 requesting album details, something done by a JSON call per album, but I don't know why Chorus2 does that (if it does). Again a guess given the lack of information.

The next post you start discussing GetAlbumPaths. AFAIK that is only called as part of music file scanning, when having added albums to the library a check is done for local image files and album.nfo for additional information. It is not something that JSON API and hence Chorus2 would call. Anyway GetAlbumPaths works fine with the music folder layout example you give, and AFAIK the SQL it uses is not "buggy".

If you want help you need to provide more information e.g. a more detailed explanation of exactly what route you are taking with Chorus2, and paste a link for a debug log file produced while doing that.
#5
DaveBlake, thank you very much for your reply.
I've uploaded the testdata that should show you the problem:
https://send.firefox.com/download/65823e...O9m35qJxzQ
There's a limit of 20 uploads and 7 days
so let me know if there would be some problems with the file download.
#6
You uploaded some poory tagged files arranged in folders inconsistently, these are no use to me whatsoever.

Tagging - no track numbers, duplicated year values

For example Album1 will have an album  path of TestMusic/album1/, but "Album Other" and "Album Another"  share the same folder as a single TestMusic/album1/.  Hence "Album Other" and "Album Another"  will not have a album path (the folder conatining all the music files of an album and only that album).

I can not see what that has to do with Chorus2. I do not see how I can help you.
#7
Thank you for your reply,
(2020-06-25, 23:34)DaveBlake Wrote: You uploaded some poory tagged files arranged in folders inconsistently, these are no use to me whatsoever.

Tagging - no track numbers, duplicated year values

Please don't focus on things that are not relevant in this case.
(2020-06-25, 23:34)DaveBlake Wrote: For example Album1 will have an album  path of TestMusic/album1/, but "Album Other" and "Album Another"  share the same folder as a single TestMusic/album1/.  Hence "Album Other" and "Album Another"  will not have a album path (the folder conatining all the music files of an album and only that album).

yes and because of that, somehow Chorus2 is not able to display it, while Kodi desktop gui has no problems with it.
Just load those files in the kodi and see how it looks in the desktop kodi version and compare what you have in the Chorus2. In the second, you'll see that chorus will in fact display artists but there will be no albums listed for it, while in the kodi desktop you'll have everything, be it artist with albums and you can play however you want.
The problem is related to the GetAlbumPath which can't properly handle such structure i.e. several single files from different albums inside of the one folder. While kodi desktop is using the GetAlbumsByWhere which doesn't have such problem.
#8
(2020-06-30, 19:29)secondlolek Wrote: Please don't focus on things that are not relevant in this case.
Then provide the relevent information. I asked for you to turn on component logging for JSON and provide a log file after using Chorus2 with the problem. Instead you sent links to badly tagged music file and so I analysed the problems with what you provided.

Instead of just providing a log file you repeat the incorrect conclusions you have jumped to that I have already refuted, makes me wonder if I am wasting my time trying to help you.
#9
Thank you for your reply,
just before I'll give you the log file
could you tell me if you have tried to load the songs I gave you into the kodi and check how they do look like in the desktop version and in chorus2? Especially when you will try to see what albums are under the artist?
#10
There are many of the team that say "no log file, no problem" and I think I'm beginning to see why. Up to you, provide a log or don't, I have penty of other things to do.
#11
DaveBlake,
sorry but I gave you a test case which is better than a log file and instead of just following my guides you prefer to waste my time.
But ok, here it is:
https://paste.kodi.tv/pugikawogo.kodi
the holly kodi.log file which contains nothing as you can see.

Now can you finally do the test I've asked in the beginning?
#12
At least the log file tells me what versions of Kodi and Chorus2 you are using. However you clearly didn't do what I asked - enable component loging and use Chorus to try and show the albums.

(2020-07-09, 19:19)secondlolek Wrote: ...you prefer to waste my time.
But ok, here it is:
https://paste.kodi.tv/pugikawogo.kodi
the holly kodi.log file which contains nothing as you can see.

Now can you finally do the test I've asked in the beginning?
How do you really expect me to respond to that attitude?
I take an interest in the issue, offer to help and ask repeatedly for certain info, you don't provide it and then accuse me of wasting your time.
 
Well I simply spent my time helping another user instead.
#13
(2020-07-13, 09:50)DaveBlake Wrote: However you clearly didn't do what I asked - enable component loging and use Chorus to try and show the albums.

well I did it actually, but it looks like you didn't read carefully my posts which explains the problem. Then you wouldn't ask me to show the albums which I can't do because this is what's actually not working.
(2020-07-13, 09:50)DaveBlake Wrote: How do you really expect me to respond to that attitude?
I take an interest in the issue, offer to help and ask repeatedly for certain info, you don't provide it and then accuse me of wasting your time.
 
Well I simply spent my time helping another user instead.
could you please tell me, why you still didn't load up the test case files I gave you and check them in chrous2?
#14
@secondlolek

Your posts have been carefully read and daveblake has consistently asked you for a Debug Log with JSON component enabled. The log you provided does not show that, and it is a log that has very obviously been edited and stitched together from other logs. Either that or there is something terribly wrong with your Kodi install.

I suggest that instead of demanding that daveblake carry out your instructions, that you provide the Debug Log with JSON component enabled, and capturing your actions in Chorus2.

Until that log is produced, Team members will not respond any further to your posts.

Please read the guide on how to create a debug log. Use the Easy method... Debug Log
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
#15
Commit id: dab69c930db7d1ef8399a204b133c9fb2c482ca8
Problematic line, causing the issue. There's even a comment that it will not work:
xbmc/music/MusicDatabase.cpp in function CMusicDatabase::GetAlbumPath
cpp:
// Check any path found is unique to that album artist, and do *not* return any path
// that is shared with other album artists. That could be because of collaborations
// i.e. albums with more than one album artist, or because there are albums by the
// artist on multiple music sources, or elsewhere in the folder hierarchy.
// Avoid returning some generic music path.
if (!basePath.empty())
{
strSQL = PrepareSQL("SELECT COUNT(album_artist.idArtist) FROM album_artist "
"JOIN song ON album_artist.idAlbum = song.idAlbum "
"JOIN path ON song.idPath = path.idPath "
"WHERE album_artist.idArtist <> %ld "
"AND strPath LIKE '%s%%'",
idArtist, basePath.c_str());
std:Confusedtring strValue = GetSingleValue(strSQL, m_pDS2);
if (!strValue.empty())
{
int countartists = static_cast<int>(strtol(strValue.c_str(), NULL, 10));
if (countartists == 0)
return true;
}
}
And now it looks like this:
cpp:

// Get the unique paths of songs on the album, providing there are no songs from
    // other albums with the same path. This returns
    // a) <album> if is contains all the songs and no others, or
    // b) <album>/cd1, <album>/cd2 etc. for disc sets
    // but does *not* return any path when albums are mixed together. That could be because of
    // deliberate file organisation, or (more likely) because of a tagging error in album name
    // or Musicbrainzalbumid. Thus it avoids finding somme generic music path.
    strSQL = PrepareSQL("SELECT DISTINCT strPath, song.idPath FROM song "
      "JOIN path ON song.idPath = path.idPath "
      "WHERE song.idAlbum = %ld "
      "AND (SELECT COUNT(DISTINCT(idAlbum)) FROM song AS song2 "
      "WHERE idPath = song.idPath) = 1", idAlbum);
Callstack:
CMusicDatabse::GetAlbumPaths (line: 7992)
CMusicDatabse::GetAlbumPath (line: 7975)
CAudioLibrary::GetAlbumDetails (line 287) < this is jsonRPC method. Because of that problematic query in GetAlbumPaths, it returns InternalError from CAudioLibrary::GetAlbumDetails in line 301.

I gave you logs, they're stripped out from the sensitive data (ip, user, etc). I had enable component log, if it's not there, then probably it's another bug I've hit. But I again give you something better. exact location of the bug, with commit id.
So now you have:
 - log
 - test case files
 - call stack
 - commit that introduce problem
 - exact line location for the needed fix

Logout Mark Read Team Forum Stats Members Help
Chorus2 doesn't load albums0