Export/Import and local artist art improvements
#42
Thanks @scott and @Karellen for such speedy testing and feedback, I greatly appreciate it. So good to have more eyes on my work while I complete it Smile
(2017-09-09, 01:11)scott967 Wrote: separate files per entry (unclear -- this means use the artist folder defined in mediasettings?)
To library folders (this is old multi-file export?)
The beginning of the explanation (I would like some help documenting what I created)....

Destination of output:
  • "Single file" - a new file in folder selected in "Destination Folder". Named with date (+ time subsequently)
  • "Separate files per entry" - a folder structure under folder selected in "Destination Folder".

    PHP Code:
    <Destination folder>
    ---
    ABBA (folder)
    ----------
    artist.nfo
    ----------fanart.jpg
    ----------folder.jpg (artist thumb)
    ----------
    Greatest Hits Vol 1 (folder)
    --------------------
    album.nfo
    --------------------folder.jpg (album thumb)
    ---
    John Williams_53b1(folder)
    ----------
    artist.nfo
    ----------fanart.jpg
    ----------folder.jpg (artist thumb)
    ----------
    Spanish Guitar Music (folder)
    --------------------
    album.nfo
    --------------------folder.jpg (album thumb)
    ----------
    Echoes of London  (folder)
    --------------------
    album.nfo
    --------------------folder.jpg (album thumb)

    ---
    John Williams_8b8a (folder)
    ----------
    artist.nfo
    ----------fanart.jpg
    ----------folder.jpg (artist thumb)
    ----------
    Pops In Space (folder) [an album by John Williams and The Boston Pops]
    --------------------
    album.nfo
    --------------------folder.jpg (album thumb
    • Artist folder name is derrived from artist name plus 4 digits of mbid (if name duplicates in library)
    • Album folder name is taken from the music folder containing the music files (if there is a unique one), otherwise from the album name.
    • Collaboration albums (more than 1 album artist) are placed under the first album artist.
    • All artists can have folders (not just album artists), but only those with albums get album subfolders.
    • How much of this structure gets created depends on what is exported.

  • "To library folders" - destinations are split. The album stuff goes with the music files (as before, but if you have mixed albums in a folder then it rather than overwrite as it did before it logs that album as can't find folder). The artists go to folders located in the new "artist information folder" setting found Settings > media > Music > artists information folder.

    Spliting makes sense to me (at least). Albums usually have folders in the music file structure, but with artists many don't, hence albums with music and artists somewhere else. That artist location could be your music source (if you have only one and have source/artist layout ), and new folders will mix in with your existing ones. But if you have all your U2 music under a folder called U2stuff, then Kodi will create U2 as a new folder (i.e. folder names need to match artist names). Persoanlly I hope users embrace the idea of a new location for artist stuff, it echos what some addons do and I hope we can integerate with those too so that other art e.g. extrafanart, logo.jpg and banner.jpg can go in the same place.

scott967 Wrote:There should be feedback to the user that the operation will fail due to no destination folder.
Noted. I'll add validation to the dialog.
Similarly for the "artist info folder" setting and export type "To library folders".

scott967 Wrote:..export file generated with a date/time stamp in filename (unclear why a different format is used; first filename is kodi_musicdb2017-09-08.xml, second one is kodi_musicdb20170908_130405.xml).
Indecision Smile
I prefer a simple filename (just date), but adding time is an easy way to ensure uniqueness. I used standard utilities to give filename with date or date and time, and they differ in format. So what would people prefer - always have date_time?

scott967 Wrote:Also no indication that export file first one is albums, second album artists (not major, just would be convenient).
Not sure how best to indicate the options used a) in the file name, b) in the xml, c) elsewhere? Happy to oblige if a good idea can be presented.

(2017-09-09, 03:00)Karellen Wrote: Set Artist information folder to outside of Music Library source...
Destination Folder: Should this be carried over from previous step? I see the previous step as a backup destination,
No, the "artist info folder" is the (future) primary location for artist art and NFO, rather than info for limited artists being mixed in with music. Of course for backward compatibility Kodi will fall back to looking for album artist stuff with the music if there isn't anything in the "artist info folder".

Backup is about taking a snapsot your data off somewhere, that is offered by export types "Single file", and "Separate files per entry" that go to the destination folder that you give on the dialog.

If I can present that im a more intuitive way for users then tell me.

Karellen Wrote:Fifth Test
  1. Export not ok- No artist.nfo created
  2. Export not ok- Not all album.nfo created 10:49:53.659 T:9016 DEBUG: CMusicDatabase::ExportToXML - Not exporting album The Very Best Of as unique path not found
The album is 2cd Fleetwood Mac- The Very Best of. In my folder structure I have treated this as one release. All songs are saved in \Fleetwood Mac\Very Best Of
MusicBrainzPicard has treated each cd as a separate release, even though it is the same album release. When looking at Test 4, it has created two folders for this album The Very Best Of_b444 and The Very Best Of_f665. In Test 5, it has failed to save any album.nfo
Interesting example.
If tagged as separate releases then Kodi will have made them separate albums, and the export and new "robust" (= does not let nfo for one album or artist apply to another album or artist) artist and album folder processing is in effect finding 2 albums in the same common folder.

It is a case where I think Kodi is right, and your tagging/folder layout conflicting. But other users are going to have done similar things, so I will try to see if I can do more with it.

Karellen Wrote:I see a conflict with file names for single file export and multiple exports on the same day. User might be testing, or incrementally building the library and export will overwrite previous
Not sure what conflict you are seeing? Overwrite of exitsing art and nfo is optional, and single file adds time to output if it fines an earier one. Can you expand on this?

Karellen Wrote:New tag... <scrapedmbid>false</scrapedmbid>, <musicbrainzreleasegroupid></musicbrainzreleasegroupid> Are there anymore?
Noticed... <track></track> has been removed
There will possibly be more before I finish with v18 Smile

Karellen Wrote:Wondering if the "OK" button can be renamed to something like "Start" or "Export Now".
Not sure what the UI philosophy is about that. Following other dialogs here OK = do it, cancel = give up. I await more UI feedback from the team for this.

You will have noticed that under the guise of improving export, I have also addressed the art and nfo only for compliant album artists issue too. Smile

I think this build has solved the hook-up of new art after import issue i.e. set art in nfo/xml and load (import/scrape), but have to visit each artist/album individually and refresh to actually see that new art. Perhaps confirm that if you know what I am talking about.

I also have a question over the consequences of unicode in artist names. At the moment it does not replace the unicode with ascii when making artist sub-folder names, although it does remove reserved chars, and I wonder if that is OK. On the otherhand replacing unicode can get messy, and many systems can cope with unicode folder names. @scott maybe stick some of your more exotic music into it and let me know.

But I'm still working on the pickup of stuff from the right places, and the export of song rating and playcount etc. Hence more test builds will be coming, so don't get too exhaustive just yet.
Reply


Messages In This Thread
RE: Music Export/Import improvements - by DaveBlake - 2017-09-09, 13:59


Logout Mark Read Team Forum Stats Members Help
Export/Import and local artist art improvements0
This forum uses Lukasz Tkacz MyBB addons.