Win export/import of music results in empty music library
#31
@ntropy your music data and use of MySQL/MariaDB has revealed a flaw in the import of song history data. I can reproduce the issue and will fix it, possibly with a backport to v18 (if we decide to do another point release). Thanks for reporting your experience and the necessary data.

That of course does not help you much in the short term. If you would still like to restore your playback history of counts and last played dates, and are prepared to get a little more hands on with the database, then I can guide you in the steps to do that possibly even provide an update script (since I have your data). But maybe it is no longer relevent for you and my time is better spent on the fix and other Kodi improvements that benefit everyone? Let me know.
Reply
#32
(2020-03-02, 19:42)DaveBlake Wrote: @ntropy your music data and use of MySQL/MariaDB has revealed a flaw in the import of song history data. I can reproduce the issue and will fix it, possibly with a backport to v18 (if we decide to do another point release). Thanks for reporting your experience and the necessary data.

That of course does not help you much in the short term. If you would still like to restore your playback history of counts and last played dates, and are prepared to get a little more hands on with the database, then I can guide you in the steps to do that possibly even provide an update script (since I have your data). But maybe it is no longer relevent for you and my time is better spent on the fix and other Kodi improvements that benefit everyone? Let me know.
I've been creating a new history so I don't think my old history would be relevant.  Good luck on the fix.
Reply
#33
Sorry to hijack this thread but I believe have the same issue as described here by the OP. I'm guessing that as this is a fairly recent post the issue has not been fixed? I'm currently running Kodi 18.7.

I'm keen to migrate from the local DB to MariaDB as I need to share my library but I'm at the very early stages and with backups so I'm able to revert to my previous set up but I would still like to migrate and retain my listening history. It looks like importing the library has restored most information including song user rating but is missing play count and last played.

I know you haven't seen my data but are you able to offer any help/advice so that can get this successfully restored?
Reply
#34
@Hallucyn8 the issue that the op revealed has been fixed in v19 by https://github.com/xbmc/xbmc/pull/17433 but not backported to the v18 series of Kodi. However I would not assume that you have the same issues as the OP unless your music collection contains multiple releases of the album.

If you provide more information i.e. a link to your SQLite db I may be able to help you more
Reply
#35
(2020-06-24, 09:55)DaveBlake Wrote: @Hallucyn8 the issue that the op revealed has been fixed in v19 by https://github.com/xbmc/xbmc/pull/17433 but not backported to the v18 series of Kodi. However I would not assume that you have the same issues as the OP unless your music collection contains multiple releases of the album.

If you provide more information i.e. a link to your SQLite db I may be able to help you more

Thanks for the reply DaveBlake.

I do have multiple releases of probably a handful of albums so it may be the same thing.

Here's a link to my my music DB taken from the backup before I started messing around with anything. Any issues with access or if you need any more information please let me know.

Link obscurred - DB
Reply
#36
@DaveBlake - Just wondered if you think you might be able to help me out or not? I'm guessing you've got my DB as you've edited the link. I'm at the point where I'm ready to commit to moving to MySQL/MariaDB so just wanted an idea on whether I'm likely to be able to restore my last played and play count or whether I just cut my losses and start afresh.
Reply
#37
Sorry @Hallucyn8 I got absorbed in something else. Yes I got the data, yes you do have multiple releases of the same album which does trip up the import of song history in v18, and yes I can help you. Well, to be precise,  I can help you if you are prepared to do a bit of direct database manipulation using SQL.
Reply
#38
(2020-06-26, 09:50)DaveBlake Wrote: Sorry @Hallucyn8 I got absorbed in something else. Yes I got the data, yes you do have multiple releases of the same album which does trip up the import of song history in v18, and yes I can help you. Well, to be precise,  I can help you if you are prepared to do a bit of direct database manipulation using SQL.

Absolutely prepared, I'm no SQL expert but can follow instructions, know my way around a command line, etc. so that would be fantastic.

And no need to apologise just appreciate you helping out.
Reply
#39
@DaveBlake Quick question (I hope)... Will it be the existing SQLite database that I need to make changes to or the new MariaDB database? Just trying to work out how far I can get before I need your magic. I'm assuming I can scan my music into the new MariaDB without any issues? And the SQL bits will either be on the SQLite database before export or on the MariaDB database post import...
Reply
#40
Quote:I'm assuming I can scan my music into the new MariaDB without any issues?
Yes, you need to do that. You may want to export art and make album and artist NFO files on the old setup first (assuming that you have everything as you like it), then scanning into the new will not have to do lots of remote scraping again for the additional information. Or you can export fro old setup as one big file (but not the song history part ) and after scanning new library on new setup import the extra artist and album data.

Manually transfering the  song playback history means working in both old and new databases. In summary:
Create a temp table in old db and fill with data, save table as SQL dump.
On new run that script to create and same temp table in new db.
Run SQL that reconciles the playback history
Delete temp table.

Even if you move the music files between old system and new it will still beable to match-up the data.

Because I have your SQLite db I have done that side of things and made the dump script, just looking at the best format to provide it to you and the other SQL. All of that will need to be run on MariaDB after you have created the new library.

@Hallucyn8 I have sent you a PM with a link to the SQL script, ask if you are unsure about anything.
Reply
#41
Great @Hallucyn8, glad that everything went well (with a small tweak). I actually documanted the process for myself as well, so I won't have to think about it if anyone else has muliple releases of the same album and want to restore song playback history with v18.
Reply

Logout Mark Read Team Forum Stats Members Help
export/import of music results in empty music library0