TVDB are updating their site. Their site currently has a number of bugs that have broken the TVDB scraper and any add-on that relies on TVDB data. TVDB are working to rectify the problems.

Export/Import and local artist art improvements
#61
Great let's try some liasing here Marcel Smile
(2017-09-24, 21:32)marcelveldt Wrote: Well, maybe first start this way, I'll review the code you're working on to get some clue of what's going on and the todolist in the forum post.
My current work in progress is broadly to improve the music library export facility. That also includes the new concept (to core Kodi) of an artist info folder - a single location separate from music files where artist art and nfo files can be held.

There is a recent test build on the mirrors f909beb-XMLExport (for win32), other platforms found accordingly.
The relevent branch of my repo is XMLExport, it has many commits which I will squish before raising a PR. See what you make of it.

(2017-09-24, 21:32)marcelveldt Wrote: Yes, ready to get into some C++ but I'll start with the python scrapers, see what needs improving so I have a goal of what to contribute to the core code. I know for example the artwork and json api for music is very minimal compared to videos so I'd properly start there.
Right, my work on a new Python album scraper, based on top what ronie did is here https://github.com/DaveTBlake/metadata.i...tendAlbums It is a mess (my first Python), but perhaps you can see where I was going with what @ronie did. I know what it needs to do but didn't get there yet.

As for extra art as it means changes to the code that I am currently working on it could be easier to add it once this is done. But we can discuss.

(2017-09-24, 21:32)marcelveldt Wrote:
(2017-09-22, 08:54)DaveBlake Wrote: I have done nothing to make the newer data (e.g. Musicbrainz release group id) available to addons. The JSON API needs updating, and whatever route addons use. I would like some input on that.
Sounds like a great project for me ;-)
Could well be :p
How does SHS, or any other addon, currently get Musicbrainz release (album) id form the music db to request online art or does it just use name?

The nominated folder for artist nfo and art...
(2017-09-24, 21:32)marcelveldt Wrote: Yes, this is exactly the part in SHS that drove me (almost) mad haha.
I thought that you would have some useful experiences to share.
(2017-09-24, 21:32)marcelveldt Wrote: In the end it turned out that 50% of the users just want their artwork stored in their media folders (including me) while others want a different folder structure to store their artwork/metadata.
...

If it were me, I would make sure that artwork is by default stored in the media folders, this is also very consistent with the other media types.
Besides that, create some settings in the scraper setup for the more advance power users like a custom folder where artwork should be stored and which artwork/metadata to collect.
Yes, albums can easily have a unique folder containing all the songs and only the songs of that album, and putting other material there - nfo and art - is fine.

But artists are not like that. And while users maybe familiar with having artist art somewhere mixed in with their music files it is a flawed approach. The same would be true for actors in video library. Kodi currently tries to find the artist and nfo for an artist from where the music files are for albums by that artist, and I bet most users have an example in their library of that failing.

Logically all music does not all fit nicely into a
my_music / <album artist name> / <album name> / {song files}
structure.
  1. Artists can appear on multiple sources. I want to start encouraging more users to have multiple music sources, it is a great way to organise larger music collectons e.g. folder for my music, another for the kids, or separating mp3 from FLAC, the stuff you don't play much but have for parties, classical from pop etc.
  2. Collaborations (more than one album artist) don't fit either. These are common in classical music that have compser, conductor and orchestra as album artists, but also occur in pop e.g. "Rising Sand" by Alison Krauss & Robert Plant, or "Riding with the King" by Eric Claptoon and BB King.
  3. Artists that don't have albums, just feature as guest artists on albums by others or on various artist compilations.
  4. Other artists that contribute to the music in some way such as producers, mixers, composers, lyricists, musicians etc., people involved in the music but not the song or album artist.
If you have only one music source, and a music/albumartist/album folder layout then yes you could add a folder for every scraped artist to that. With 4) that could be a lot of folders. For 2) where are the collaboration albums located - first album artist folder or some other named folder? And of course what if the artist folder name used does not match exactly the artist name?

For me the best way forwards is a nominated artist folder. If the user sets this to the same as a music source then they get to live within the limitations and manage the consequences. This may be what 50% of users choose to do, but the more generic design is more robust and flexible.

But obviously there is the need for backwards compatibility - users that have carefully put their art where we told them to and used a suitable folder layout will want it to work in v18. Hence the process will be look for art in the artist info folder. If that does not exist then try to identify a unique folder that contains music by that artist and only that artist (a new check that will prevent some of the funny results users get) and look for art there. However Kodi will not export art to that location (unless that is where the nominated artist info folder is set).

Putting the artist folder setting in the scraper is an interesting idea, but then Kodi can have many different scrapers and it could lead back to having repeats of the same data in many places. So I have added it (in the wip) as a main music setting.

What does need some improvement (in my wip) is how to make setting it more user friendly, especially as it will be initlally blank for both clean installs and upgrades alike. [More on that in a later post where I deal with jjd_uk feedback on UI]

(2017-09-24, 21:32)marcelveldt Wrote: Imo all this base logic should be in Kodi core and/or the official scrapers and the addons (like SHS and such) are either obsolete or only cover some edge cases that are not needed to target main audience. In anyway I want to get rid of the 100's of python processes running to just provide a part of the puzzle.
Sounds good, but may take a while to get there.

In the immediate future I hope we can at least get any addon that fetches additional art (or info) to minimise requests to MB by using the stored MB release group ids, and to put the images it fetches in a common location defined by Kodi settings. What would SHS currently need from Kodi core to do that?

A specific question about your experience with making folder names from artist. I notice that you use unicodedata.normalize('NFKD' to convert unicode artist or album names before creating a folder name with it. There isn't a standard C++ equivalent, and so although I could do some translation of unicode I wonder if it is necessary or worth it. Your thoughts, or any examples of problems if you don't "sanitize" or "normalise"
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average


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


Logout Mark Read Team Forum Stats Members Help
Export/Import and local artist art improvements00