Scraping from NFO files with new Python music scrapers
#6
(2019-03-26, 09:52)DaveBlake Wrote: Yes @Karellen also noticed this behaviour while testing PR15791 (optionally ignore NFO on refresh) with the beta Python scrapers enabled. In his case it resulted in an error because the NFO file was created with available art URL data fetched using a previous scraper version and that produced an NFO that the xml scraper could not parse.

But none of this behaviour is caused by PR15791, it relates to the use of Python scrapers, hence going to edit the thread title.
 
(2019-03-26, 02:53)scott967 Wrote: Got same results. It works, but I don't see why it calls the integral artist scraper twice (and loads progress dialog in the background) and then does something with UAS.
It does seem odd doesn't it, but it is also how scraping from NFO files has worked for years, however the logging that comes with calling Python scripts makes the multiple scraper calls more obvious.

First thing the scraper (core code) always does is resolve Musicbrainz ID (if it has one) and creates a "URL"
- for the xml scrapers this is actually the URL needed to fetch data for that item from Musicbrainz
`http://musicbrainz.org/ws/2/artist/e119e5ff-0de0-421c-a630-0516c6acede8?inc=url-rels`
- for Python scrapers it looks like {"mbid": "e119e5ff-0de0-421c-a630-0516c6acede8", "artist": ""}

Then it checks for an NFO file, and if one exists (and is not ignored) the process passes to the NFO reader. The NFO reader loops through all the enabled scrapers of that kind trying to scrape the NFO file using it until it finds one that can succesfully do that. In that list of scrapers will be metadata.local, and that reads the NFO. The order of scrapers in the internal list will effect what other scrapers get tried before it.

So Scott what you observe makes sense given the code, but I have doubts about how sensible an approach it is. Why resolve the Muiscbrainz ID when it is not used? Why loop through scrapers when metadata.local is what is wanted? Something to be looked at more fully for v19 
Thanks for the overview of the program flow.  I didn't want to pollute the PR conversation with non-code Qs.

scott s.
.
Reply


Messages In This Thread
RE: PR15791 Prompt to use nfo files - by scott967 - 2019-03-27, 00:51
Logout Mark Read Team Forum Stats Members Help
Scraping from NFO files with new Python music scrapers0