Library only shows first track from cue sheet
#1
I'm pretty sure Kodi updated to a new version today (took a long time reconfiguring addons) Version is 19.0.0, using on Sony Andrioid TV.

It seems that all of my files that use a .cue sheet are only listing the first track in the library section. I see all tracks when I navigate to the folder in the "files" section.

I'm assuming it's a weird setting that got toggled, but I can't find anything.

Also odd is that when I first started up I was looking at a newly added album that uses a .cue, and I saw all the tracks. Later, after I noticed the issue, it has the same problem, which again makes me wonder if I changed a setting somehow.

Thanks!
Reply
#2
I see others have had the same issue and a reinstall is required. Will update once done.
Reply
#3
(2021-02-25, 00:26)geemarcus Wrote: I see others have had the same issue and a reinstall is required. Will update once done.

Fixed with reinstall.
Reply
#4
Sounds to me like something is going wrong in the forced rescan process for music from cue sheets (i.e. one file many songs). Rather than reinstalling, dropping the music sources, cleaning and then re-adding (and thus scanning first time) should be a work around.
Reply
#5
After Kodi upgrade I experienced the same issue - all my single flac + cue albums displayed only first track. I reinstalled Kodi and issue resolved. Then I noticed some problems like missing cover art so I fixed them and then scanned sources and cleaned library and suddenly the problem returned back. But followed suggestion above I only removed music sources and after I noticed leftovers of artists I deleted music database file (music85.db if I remember right) and finally everything is intact.
Reply
#6
There is regression in v19.0: rescanning of music from cuesheets - either forced rescaning files that have not changed as part of migration to v19 from older versions, or of an edited cuesheet already in the music library - will result in only the first track being in the library. It does not effect cuesheets that a freshly scanned into the library.

This issue is fixed by https://github.com/xbmc/xbmc/pull/19392 (against v20) and fix backported to v19 Matrix by https://github.com/xbmc/xbmc/pull/19394 which should be in v19.1 when released.

I can produce test builds for some platforms if any user with cuesheets and still having an original  MyMusic72.db database is able to test it.
Reply
#7
(2021-03-11, 20:30)DaveBlake Wrote: There is regression in v19.0: rescanning of music from cuesheets - either forced rescaning files that have not changed as part of migration to v19 from older versions, or of an edited cuesheet already in the music library - will result in only the first track being in the library. It does not effect cuesheets that a freshly scanned into the library.

This issue is fixed by https://github.com/xbmc/xbmc/pull/19392 (against v20) and fix backported to v19 Matrix by https://github.com/xbmc/xbmc/pull/19394 which should be in v19.1 when released.

I can produce test builds for some platforms if any user with cuesheets and still having an original  MyMusic72.db database is able to test it.

Thanks, Dave.  Who'd've thought it would be so complicated when Krypton->Leia achieved the update seamlessly? I'll give your patch a go on OSMC later.

Later: Built Matrix with the patch.  Deleted MyMusic82 (MyMusic72 is still there) and re-started Kodi. Got a prompt to re-scan music - said no and verified I'm getting all the tracks still.  Is this expected behaviour?

Re-scanning is veeeery slooow.
Reply
#8
(2021-03-11, 20:30)DaveBlake Wrote: There is regression in v19.0: rescanning of music from cuesheets - either forced rescaning files that have not changed as part of migration to v19 from older versions, or of an edited cuesheet already in the music library - will result in only the first track being in the library. It does not effect cuesheets that a freshly scanned into the library.

This issue is fixed by https://github.com/xbmc/xbmc/pull/19392 (against v20) and fix backported to v19 Matrix by https://github.com/xbmc/xbmc/pull/19394 which should be in v19.1 when released.

I can produce test builds for some platforms if any user with cuesheets and still having an original  MyMusic72.db database is able to test it.

@DaveBlake , I got bitten by matrix's cuesheet handling bug in a bad way but great to see here that there appears to be a fix - single flac+cuesheet is my format of choice and I have thousands, almost my entire collection.

Dave are you able to produce a test build with the patch for Ubuntu (LTS / 20.04.x / amd64), and post the link here?

I have built a virtual environment where I can test it and I have backups of my Music72.db (in fact I only upgraded one kodi instance out of 2 that I use, they share the same mySQL DB), so I can easily drop the "82" db and have it rebuilt by your test build, test it out, add content and do re-scans etc. I want to help ensure that 19.1 includes the right fixes for cuesheet-based collections. My bad for not attempting to do this sometime in the last 12 months to help test the release.

I guess I didn't notice this bug prior because in the past (Krypton and prior releases) I didn't use scoring on my collection at all, nor cared about playcounts etc, and I used to just delete the MusicDB and had it rebuilt it each time. Now for the last 3+ years I have built many smart lists that use playcounts in the logic, I added scoring for my top albums and songs etc. and I don't want to lose that information in the upgrade process.

Thanks Dave as always for the fantastic work you do.
Reply
#9
(2021-03-12, 15:04)graham-h Wrote: Later: Built Matrix with the patch.  Deleted MyMusic82 (MyMusic72 is still there) and re-started Kodi. Got a prompt to re-scan music - said no and verified I'm getting all the tracks still.  Is this expected behaviour?
Re-scanning is veeeery slooow.
Yes that is as expected, but unfortunately @graham-h it means that you have not tested the fix (and you will not have the new facilities of v19 that are based on scanning new tags, but those don't effect cuesheets). The regression effects re-scanning. If you really want to avoid rescanning the whole library for now then you can test by rescanning just some folders. Assuming that you have your music in some folder structure, navigate in file view to say an artist subfolder and from the contex menu pick "scan to library" and then answer yes to "Do full tag scan even when music files are unchanged?". Check what happens to those albums - all the songs should appear.

(2021-03-28, 23:18)htpcero Wrote: Dave are you able to produce a test build with the patch for Ubuntu (LTS / 20.04.x / amd64), and post the link here?
@ htpcero I can get builds for Win64, Android and OSX easily but the many Linux distros makes it diifficult. Many on Ubuntu build patches for themselves, but don't ask me how they do it. A fellow team member is looking at maybe providing something for v20.04,  so I will let you know if that results in something.

(2021-03-28, 23:18)htpcero Wrote: I want to help ensure that 19.1 includes the right fixes for cuesheet-based collections. My bad for not attempting to do this sometime in the last 12 months to help test the release.
Thanks, the small active dev team needs such assistence from the community. Sorry for the regression, it was faulty (some processing has always assumed a one-to-one song to file relationship that isn't true for cuesheets) but I finally broke it completely in my efforts to maintain IDs between scans. Darn cue sheets!

But you will gain benefits with v19  if you use remote apps, intelligently designed remotes will be able to update playback history etc. without doing a complete resync of the entire library. Having Yatse show recently played albums etc. without a full re-sync really makes me happy.
Reply
#10
(2021-03-31, 13:40)DaveBlake Wrote: @ htpcero I can get builds for Win64, Android and OSX easily but the many Linux distros makes it diifficult. Many on Ubuntu build patches for themselves, but don't ask me how they do it. A fellow team member is looking at maybe providing something for v20.04,  so I will let you know if that results in something.
(2021-03-28, 23:18)htpcero Wrote: I want to help ensure that 19.1 includes the right fixes for cuesheet-based collections. My bad for not attempting to do this sometime in the last 12 months to help test the release.
Thanks, the small active dev team needs such assistence from the community. Sorry for the regression, it was faulty (some processing has always assumed a one-to-one song to file relationship that isn't true for cuesheets) but I finally broke it completely in my efforts to maintain IDs between scans. Darn cue sheets!

But you will gain benefits with v19  if you use remote apps, intelligently designed remotes will be able to update playback history etc. without doing a complete resync of the entire library. Having Yatse show recently played albums etc. without a full re-sync really makes me happy.

@DaveBlake 
Awesome news RE new remote capabilities! one of my builds is headless (music-only) and I use Yatse and the WebUI all the time with it, I can't wait for the Raspberry 19.x build to hit the main distros! I know it's on the way.

For testing the cuesheet patch, I can use a macos laptop (MBP running bigsur), if you could post a link to a patched kodi macos installer, I can set it up and test the full workflow: test the initial DB conversion (takes about half an hour in my case), and also test library scans.
Reply
#11
@htpcero  you have two test possibilities: for OSX http://mirrors.kodi.tv/test-builds/osx/x...x86_64.dmg

But thanks to my fellow team member I think this should work on Unbuntu 20.4
https://launchpad.net/~wsnipex/+archive/...hive-extra

It is the forced re-scan of cue sheets after database migration that is the issue, hopefully all songs will be present with correct playcounts etc.
Reply
#12
@DaveBlake currently testing with the Mac build. The initial conversion took 45 minutes but went well, spot checking showed all data was there (rankings, playcounts).

Then I did a full forced rescan, after 3 hours (3500 albums, in a remote NFS share) the log showed that the scan was done, I see this:

2021-04-01 16:16:00.159 T:4534089 INFO <general>: My Music: Scanning for music info using worker thread, operation took 02:42:17

However, one our after the above log entry, the GUI is still showing the spinning wheel (and no further entries in the log).  Wondering if I should force-close Kodi and reopen - I will leave this running 3-4 more hours to see if it finishes gracefully and advise.

Question - for just 5 albums (out of thousands), there were errors like this one in the log:

Code:
2021-04-01 13:59:25.418 T:4534089 ERROR <general>: SQL: [MyMusic82] Undefined MySQL error: Code (1406)
Query: INSERT INTO artist (idArtist, strArtist, strMusicBrainzArtistID) VALUES( NULL,....
2021-04-01 15:42:44.259 T:4534089 ERROR <general>: musicdatabase:unable to addartist (INSERT INTO artist (idArtist, strArtist, strMusicBrainzArtistID) VALUES( NULL, ...

In all cases, the Artist strings (cuesheet PERFORMER) are huge, 270 characters or more. @DaveBlake  do you know what is the character limit for this field? is it 255 chars?  
(I will trim the Artist fields on the 5 albums with issues based on whatever the limit is)

ps. after another three hours, seeing that Kodi was consuming 100% of one of the 4 CPUs in the Mac, I killed the process and restarted it. All 3.5K albums and all 45K songs were still in the library. Zero issues, other than kodi hanging after the scan which I guess (and hope) is just a Mac problem - I've never seen this type of hang on linux.

p.s.2 I did notice one problem, not sure if it's a matrix / 19.x issue or a 20.x alpha issue (the mac build seems to be based on master, 20.0.alpha)
The Top-100 album list is broken, nothing shows when clicking it, and the log shows this:

Code:
2021-04-01 18:50:47.405 T:4689460 ERROR <general>: GetAlbumsByWhere () failed
2021-04-01 18:50:47.405 T:4689460 ERROR <general>: GetDirectory - Error getting library://music/top100/top100albums.xml/
2021-04-01 18:50:47.418 T:4681839 ERROR <general>: CGUIMediaWindow::GetDirectory(library://music/top100/top100albums.xml/) failed
2021-04-01 18:50:55.596 T:4689587 ERROR <general>: SQL: Missing result set!
Reply
#13
Thanks for such productive testing @htpcero, yes test build was v20 which for music is still very much the same as v19 at the moment.

Sounds like the busy dialog was left running whch is odd. That isn't going to be easy to reproduce to debug, but maybe  a look at the full log would tell me something. I know it will be huge, so zip and upload to cloud (splitting into paste-bin sizes chunks can be tedious, and I'm prepared to dip into a link on this occassion instead).

Yes individual artist names in the artist table are limited to 256 chars, it is an indexed field and in MySQL that has to have a length. I am in two minds about truncating longer names internally. It would avoid the SQL error, but then that does show there is an issue.  Invalidation at an earlier point could be cleaner, but would still need the user to look in the log since scanning is a background process. You have huge cuesheet PERFORMER values, can you give an example. Is it a combination of artists but without separators?

The log for the top 100 album failure shows SQL: Missing result set! and that can be a cuased by the way the MySQL server-sort-buffer is configured. See https://forum.kodi.tv/showthread.php?tid=357217

So you kicked out some other issues, but from a testing of the bug I was attempting to fix I call this a success.
Reply
#14
(2021-04-03, 09:21)DaveBlake Wrote: Thanks for such productive testing @htpcero, yes test build was v20 which for music is still very much the same as v19 at the moment.

Sounds like the busy dialog was left running whch is odd. That isn't going to be easy to reproduce to debug, but maybe  a look at the full log would tell me something. I know it will be huge, so zip and upload to cloud (splitting into paste-bin sizes chunks can be tedious, and I'm prepared to dip into a link on this occassion instead).

Yes individual artist names in the artist table are limited to 256 chars, it is an indexed field and in MySQL that has to have a length. I am in two minds about truncating longer names internally. It would avoid the SQL error, but then that does show there is an issue.  Invalidation at an earlier point could be cleaner, but would still need the user to look in the log since scanning is a background process. You have huge cuesheet PERFORMER values, can you give an example. Is it a combination of artists but without separators?

The log for the top 100 album failure shows SQL: Missing result set! and that can be a cuased by the way the MySQL server-sort-buffer is configured. See https://forum.kodi.tv/showthread.php?tid=357217

So you kicked out some other issues, but from a testing of the bug I was attempting to fix I call this a success.


Huge success, thanks for the fix! I tested other workflows like adding content and all worked very well.

I will retest deleting Music82 and capture a debug log of the entire processand send you a PM with the link, it will be a massive file

I will capture a second debug log with the Top-100 issue and share as well separately. I could see the same issue in 19.0 on Ubuntu as well (in addition the Mac 20.0aplha version)
Reply
#15
On the Artist name, here is the context: many (many) years ago when I started to turn my classical music collection to digital the only reliable field to store composer and performer info was the PERFORMER field. So I came up with this convention for it:

"Composer; performing orchestra, soloists; director"

This works well in general, I use "smart playlists" to slice the collection. Also when importing, Kodi is smart and uses de ";" as a separator of multiple artists which further helps.

The problem are the operas with many solists in the list as in a few cases I included the singer details. There are 5 of them with 8 or ten main characters that are the ones that error out.
Reply

Logout Mark Read Team Forum Stats Members Help
Library only shows first track from cue sheet0