Kodi Community Forum
Win export/import of music results in empty music library - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Music Support (https://forum.kodi.tv/forumdisplay.php?fid=263)
--- Thread: Win export/import of music results in empty music library (/showthread.php?tid=351921)

Pages: 1 2 3


export/import of music results in empty music library - ntropy - 2020-02-21

I wanted to move from a local database to a mariadb one, so I exported music to one file, quit Kodi, switched advanced settings to point to mariadb IP address, started Kodi, went to media music import and selected the export file for import, saw a flurry of names for a few seconds, and then the music library appeared empty.   The music export lasted a few seconds and created an xml of 18107 lines (no artwork folder like the video export did).   So why the empty music library?   I'm doing a manual scan which is at 35% but I had hoped to avoid this by exporting/importing.  Plus the new manual scan is re-writing my "Recently added albums" history.  The video export/import seemed to work.   Why not the music?


RE: export/import of music results in empty music library - Karellen - 2020-02-21

@ntropy

The music library works differently to the Video library.

The music library is created by scanning the embedded tags of your music files. These need to be scanned into the library first to create the library entries. The file you are trying to import then adds additional information that was scraped.

Moved to Music forum


RE: export/import of music results in empty music library - ntropy - 2020-02-21

(2020-02-21, 02:44)Karellen Wrote: @ntropy

The music library works differently to the Video library.

The music library is created by scanning the embedded tags of your music files. These need to be scanned into the library first to create the library entries. The file you are trying to import then adds additional information that was scraped.

Moved to Music forum

So I can still get back my recently added/played albums history from importing after?

I have four folders to scan.  Do I have to scan one and wait until it is finished before initiating the scan command on the second, etc?


RE: export/import of music results in empty music library - Karellen - 2020-02-21

(2020-02-21, 02:49)ntropy Wrote: So I can still get back my recently added/played albums history from importing after?
Yes, once you scan your music files, the Import file will add back your playback history.

(2020-02-21, 02:49)ntropy Wrote: I have four folders to scan.  Do I have to scan one and wait until it is finished before initiating the scan command on the second, etc?
Yes, you need to wait for the first scan to finish before starting the next scan. There is no queue function for scanning.


RE: export/import of music results in empty music library - ntropy - 2020-02-21

I just imported after scanning and don't see any music history emerging.


RE: export/import of music results in empty music library - Karellen - 2020-02-21

Are you using v18.2 or later? Was the exported file created by v18.2 or later? Playback history was introduced in v18.2 and is not backwards compatible.

I just noticed that requirement is missing from the wiki page (sorry), but I will add that in now.


RE: export/import of music results in empty music library - ntropy - 2020-02-21

(2020-02-21, 04:38)Karellen Wrote: Are you using v18.2 or later? Was the exported file created by v18.2 or later? Playback history was introduced in v18.2 and is not backwards compatible.

I just noticed that requirement is missing from the wiki page (sorry), but I will add that in now.

Exported from 18.5 and imported to 18.5.


RE: export/import of music results in empty music library - Karellen - 2020-02-21

Can you upload that exported file to a file sharing site and provide the link. You can pm me the link if you want to keep it private.

I would like to check for the song data in the file.

Thanks.


RE: export/import of music results in empty music library - DaveBlake - 2020-02-21

Did you actually export the song playback history? You exported to a single file, but what items did you choose to export? If ratings and playcount and last played are not importing that I suspect that you simply didn't export them.

If that is the case and you still have the SQLite db file then you can temporarily point Kodi at that database, export the song playback history (only songs need exporting), point Kodi back at your Mariadb and import your newly created xml file.


RE: export/import of music results in empty music library - ntropy - 2020-02-24

(2020-02-21, 07:33)Karellen Wrote: Can you upload that exported file to a file sharing site and provide the link. You can pm me the link if you want to keep it private.

I would like to check for the song data in the file.

Thanks.

Here's a link: https://wetransfer.com/downloads/866d27e140cb31c941a734ac4e4ae2e920200224184436/939c98887a97c5bca7fb003bed9ae39120200224184436/199d89


RE: export/import of music results in empty music library - ntropy - 2020-02-24

(2020-02-21, 11:40)DaveBlake Wrote: Did you actually export the song playback history? You exported to a single file, but what items did you choose to export? If ratings and playcount and last played are not importing that I suspect that you simply didn't export them.

If that is the case and you still have the SQLite db file then you can temporarily point Kodi at that database, export the song playback history (only songs need exporting), point Kodi back at your Mariadb and import your newly created xml file.
I selected everything.  I've been re-organizing music files since the export so the chance for this to work has probably passed.


RE: export/import of music results in empty music library - DaveBlake - 2020-02-24

(2020-02-24, 20:48)ntropy Wrote: I selected everything.  I've been re-organizing music files since the export so the chance for this to work has probably passed. 
The song playback history import is not filename or folder specific, it uses song properties e.g. title, artist etc., so moved music files are not a problem.

The question is whether the song playback history is in the export file or not. If you can share that file then I will check for you.


RE: export/import of music results in empty music library - ntropy - 2020-02-24

(2020-02-24, 21:13)DaveBlake Wrote:
(2020-02-24, 20:48)ntropy Wrote: I selected everything.  I've been re-organizing music files since the export so the chance for this to work has probably passed. 
The song playback history import is not filename or folder specific, it uses song properties e.g. title, artist etc., so moved music files are not a problem.

The question is whether the song playback history is in the export file or not. If you can share that file then I will check for you. 
Here's the link: https://wetransfer.com/downloads/866d27e140cb31c941a734ac4e4ae2e920200224184436/939c98887a97c5bca7fb003bed9ae39120200224184436/199d89


RE: export/import of music results in empty music library - Karellen - 2020-02-25

(2020-02-24, 20:46)ntropy Wrote: Here's a link: https://wetransfer.com/downloads/866d27e...436/199d89
Thanks. The song play count and last played data is definitely there. This is the very first entry from the file you provided...
    <song>
<idsong>132</idsong>
<artistdesc>John Carpenter &amp; Alan Howarth</artistdesc>
<title>“You Are The Duke Of New York”</title>
<track>18</track>
<filename>Escape From New York - Expanded Edition - 18 - “You Are The Duke Of New York”.m4a</filename>
<musicbrainztrackid></musicbrainztrackid>
<idalbum>13</idalbum>
<albumtitle>Escape From New York - Expanded Edition</albumtitle>
<musicbrainzalbumid></musicbrainzalbumid>
<albumartistdesc>John Carpenter &amp; Alan Howarth</albumartistdesc>
<timesplayed>1</timesplayed>
<lastplayed>2019-11-23 03:28:42</lastplayed>
<rating max="10">0.0</rating>
<votes>0</votes>
<userrating max="10">0</userrating>
</song>

I do note that you have no artist or album information exported, just song data. Can you confirm you have scanned your music files into the library of your new setup?


RE: export/import of music results in empty music library - ntropy - 2020-02-25

(2020-02-25, 01:30)Karellen Wrote:
(2020-02-24, 20:46)ntropy Wrote: Here's a link: https://wetransfer.com/downloads/866d27e...436/199d89
Thanks. The song play count and last played data is definitely there. This is the very first entry from the file you provided...
 <song>
<idsong>132</idsong>
<artistdesc>John Carpenter &amp; Alan Howarth</artistdesc>
<title>“You Are The Duke Of New York”</title>
<track>18</track>
<filename>Escape From New York - Expanded Edition - 18 - “You Are The Duke Of New York”.m4a</filename>
<musicbrainztrackid></musicbrainztrackid>
<idalbum>13</idalbum>
<albumtitle>Escape From New York - Expanded Edition</albumtitle>
<musicbrainzalbumid></musicbrainzalbumid>
<albumartistdesc>John Carpenter &amp; Alan Howarth</albumartistdesc>
<timesplayed>1</timesplayed>
<lastplayed>2019-11-23 03:28:42</lastplayed>
<rating max="10">0.0</rating>
<votes>0</votes>
<userrating max="10">0</userrating>
</song>

I do note that you have no artist or album information exported, just song data. Can you confirm you have scanned your music files into the library of your new setup?    

I have scanned my music files in the new setup.   The recently played album history in Kodi doesn't have anything played before Feb 20, like this from the export:

<song>
        <idsong>95038</idsong>
        <artistdesc>Miklós Rózsa</artistdesc>
        <title>The Lost Weekend - The Weekend Begins</title>
        <track>65537</track>
        <filename>01 The Lost Weekend - The Weekend Begins.flac</filename>
        <musicbrainztrackid>528048ea-f6f6-4dc3-9e33-0c0e27b03a80</musicbrainztrackid>
        <idalbum>3503</idalbum>
        <albumtitle>Double Indemnity / Killers / Lost Weekend</albumtitle>
        <musicbrainzalbumid>4556e493-5b3d-4f08-abaf-1ed8fc926717</musicbrainzalbumid>
        <albumartistdesc>Miklós Rózsa</albumartistdesc>
        <timesplayed>1</timesplayed>
        <lastplayed>2020-02-20 01:44:57</lastplayed>
        <rating max="10">0.0</rating>
        <votes>0</votes>
        <userrating max="10">0</userrating>
    </song>



This forum uses Lukasz Tkacz MyBB addons.