Win export/import of music results in empty music library
#16
That is strange, because the data is clearly in the export file.

Could you...

1. Provide the Music database in your Userdata (wiki) folder. I would like to see what the import has done in the database. You can PM me the link if you would like to keep it private and I will pass it onto daveblake if I cannot figure it out.
2. Provide a screenshot of where you are seeing the last played dates. I have only just realised that the default skin Estuary does not display that data.

Thanks
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)
Reply
#17
(2020-02-25, 03:54)Karellen Wrote: That is strange, because the data is clearly in the export file.

Could you...

1. Provide the Music database in your Userdata (wiki) folder. I would like to see what the import has done in the database. You can PM me the link if you would like to keep it private and I will pass it onto daveblake if I cannot figure it out.
2. Provide a screenshot of where you are seeing the last played dates. I have only just realised that the default skin Estuary does not display that data.

Thanks
Here's the database: https://wetransfer.com/downloads/f06c35d...329/8f272b

I'm in Estuary too and don't see the dates, I just see (remember seeing) the played history of album covers in the music tab of Kodi which was not restored upon importing that exported music file above.
Reply
#18
@ntropy

I am not seeing any problem. You have 1055 song that have have a Played Count somewhere between 1 - 7 times. The Last Played date ranges between 2019-03-02 20:50:28 and 2020-02-20 02:18:30 and you have only 5 songs that were played on 20 Feb.

(2020-02-25, 19:36)ntropy Wrote: I just see (remember seeing) the played history of album covers in the music tab of Kodi
I don't know where you could have seen that. Can you post a screenshot. Even if the data is no longer there, at least I know what you were looking at.

But as far as I can see, there is no problem.
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)
Reply
#19
(2020-02-25, 19:54)Karellen Wrote: @ntropy

I am not seeing any problem. You have 1055 song that have have a Played Count somewhere between 1 - 7 times. The Last Played date ranges between 2019-03-02 20:50:28 and 2020-02-20 02:18:30 and you have only 5 songs that were played on 20 Feb.
(2020-02-25, 19:36)ntropy Wrote: I just see (remember seeing) the played history of album covers in the music tab of Kodi
I don't know where you could have seen that. Can you post a screenshot. Even if the data is no longer there, at least I know what you were looking at.

But as far as I can see, there is no problem.  
Here's my current view:

Image
Reply
#20
You would not see Play Count and Last Played information on that screen.
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)
Reply
#21
I all looks fine to me too - song playback history was sucessfully imported.

(2020-02-25, 19:36)ntropy Wrote: I'm in Estuary too and don't see the dates, I just see (remember seeing) the played history of album covers in the music tab of Kodi which was not restored upon importing that exported music file above. 
Do you mean that on the main page the row of "recently played albums" didn't look like the recently played albums you expected? Of course now you have played things that will have changed. Anyway if that was what caused you to think import had not worked then it could just have been the widget that displays that stuff being cached and not refreshing. But that is a wild guess.

To convince yourself that song history was imported try looking and albums or songs and sorting by playcount, or last played, in wide list view so you see the values of count or lastplayed.
Reply
#22
(2020-02-25, 20:18)DaveBlake Wrote: I all looks fine to me too - song playback history was sucessfully imported.
(2020-02-25, 19:36)ntropy Wrote: I'm in Estuary too and don't see the dates, I just see (remember seeing) the played history of album covers in the music tab of Kodi which was not restored upon importing that exported music file above. 
Do you mean that on the main page the row of "recently played albums" didn't look like the recently played albums you expected? Of course now you have played things that will have changed. Anyway if that was what caused you to think import had not worked then it could just have been the widget that displays that stuff being cached and not refreshing. But that is a wild guess.

To convince yourself that song history was imported try looking and albums or songs and sorting by playcount, or last played, in wide list view so you see the values of count or lastplayed. 

Yes they've changed now because I've been playing since the import, but immediately after re-scan and import of music file, it was blank.  Then on the first album played, all that showed was one album played -- no history of albums prior.   It was this prior album history from Feb 20 & earlier that I was looking for.  I use my recent album played history to... revisit music I've recently played.   Switching from local to mariadb has taken away my pre-Feb 20 recent album history.  It's not a seamless transition.
Reply
#23
Hang on, you linked a SQLite db for us to look at, but your issue is on mariaDB?

OK, so that was the old db and an exported xml file that shows the song playback history exported. Can you turn debug on and try importing that xml file to your new setup (it won't overwrite your recent playback history as it checks for smaller counts and eariler dates), then send a link to the log.

If this is not working then I really do want to try and find out why.
Reply
#24
(2020-02-25, 20:38)DaveBlake Wrote: Hang on, you linked a SQLite db for us to look at, but your issue is on mariaDB?

OK, so that was the old db and an exported xml file that shows the song playback history exported. Can you turn debug on and try importing that xml file to your new setup (it won't overwrite your recent playback history as it checks for smaller counts and eariler dates), then send a link to the log.

If this is not working then I really do want to try and find out why.

https://paste.kodi.tv/azuyamihon.kodi
Reply
#25
There certainly is an error, but @DaveBlake will need to decipher it.

xml:
ERROR: SQL: [MyMusic72] Undefined MySQL error: Code (1242)
Query: UPDATE HistSong SET idAlbum = (SELECT album.idAlbum FROM album WHERE HistSong.strAlbumArtistDisp = album.strArtistDisp AND HistSong.strAlbum = album.strAlbum) WHERE EXISTS(SELECT 1 FROM album WHERE HistSong.strAlbumArtistDisp = album.strArtistDisp AND HistSong.strAlbum = album.strAlbum)AND idAlbum < 0
ERROR: CMusicDatabase::ImportSongHistory failed
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)
Reply
#26
The debug log shows the import failing, but "Undefined MySQL error: Code (1242)" sadly does not tell me anything. And there is nothing wrong with the SQL that I can see, at least the same command runs on both MySQL and SQLite.

The only way for me to progress is to have your album and song table data too and try testing against that. Unfortunately with MariaDB/MySQL it is not as easy as just passing the db file. @ntropy do you know how to export data from tables in a MariaDB? If you can provide the song and album tables (or the full db) using something like HeidiSQL then that would be great, otherwise I will try to get some simple instructions for you.
Reply
#27
(2020-02-26, 10:38)DaveBlake Wrote: The debug log shows the import failing, but "Undefined MySQL error: Code (1242)" sadly does not tell me anything. And there is nothing wrong with the SQL that I can see, at least the same command runs on both MySQL and SQLite.

The only way for me to progress is to have your album and songtable data too and try testing against that. Unfortunately with MariaDB/MySQL it is not as easy as just passing the db file. @ntropy do you know how to export data from tables in a MariaDB? If you can provide the song and album tables (or the full db) using something like HeidiSQL then that would be great, otherwise I will try to get some simple instructions for you.
Heidi export link:  https://wetransfer.com/downloads/f954fa2...232/174bbe
Reply
#28
Thanks @black_eagle error 1242 is indeeed a "more than 1 row returned" issue, and that makes me even more eager to get my hands on the data. 

Thanks @ntropy but unfortunately the file only contains structure and I need the data. In Heidi database export facility there is a drop down for data, pick "INSERT" and try again, or I am advised by my friend that from command line you can use

mysqldump -u <username> -p --databases MyMusic72 > MyDatabase.sql
Reply
#29
(2020-02-26, 18:54)DaveBlake Wrote: Thanks @black_eagle error 1242 is indeeed a "more than 1 row returned" issue, and that makes me even more eager to get my hands on the data. 

Thanks @ntropy but unfortunately the file only contains structure and I need the data. In Heidi database export facility there is a drop down for data, pick "INSERT" and try again, or I am advised by my friend that from command line you can use

mysqldump -u <username> -p --databases MyMusic72 > MyDatabase.sql
Link of export with insert on:

https://wetransfer.com/downloads/6484453...417/4ce101
Reply
#30
Thanks @ntropy your data breaks the import facility on MySQL but not on SQLite so I am still analysing what is happening.

I do note that you have multiple releases of the same album, are you really such a film music fan or is that a tagging accident?
Reply

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