For anyone that is confused it turns out that Ryan and I are having a discussion about the future of art handling addons/scrapers and Kodi requirements. I started it (I think) but it is beyond the work I am doing now, but useful all the same.
Ryan I'm not sure I'm getting all you are saying, and I fear you have misunderstood me, so a reprise and some questions.....
Scrapers or other addons to fetch art:
(2018-02-28, 18:42)DaveBlake Wrote: [ -> ]Scrapers are addons true, but they get invoked by a special part of core. Maybe we are going the wrong way with that, stuck in an historic groove. An addon does not have to be a "scraper" to add art, so maybe we leave scraping just to identifying music (or video) and all the fetching of art for things is done by other addons?
(2018-03-01, 06:41)rmrector Wrote: [ -> ]Two separate and unrelated processes to fill library data is awkward and complicates things. I still think composing multiple scrapers is the way to go here.
The downside to that is that scraper addons are bound by core scraper processing, while a general addon that used JSON to change the art in DB would not be. Having more scrapers does not prevent other art addons existsing, so any awkward complication continues. But I was just musing, not suggesting we actually stop scraping!
Fair use of online resources:
(2018-03-01, 06:41)rmrector Wrote: [ -> ]I don't think that there are millions of Kodi boxes manually managing artwork by hand in the Kodi GUI so frequently that free resources will even notice, nevermind be killed.
I agree, manual management is not a problem, but
automated refresh could be.
No it is not actual the download of images that is the issue, but unnecessary repeated requests for info including possible artwork that we need to avoid.
You seemed to not like having scrapper results (art URLs) held in the db, seeing it as too static and getting quickly out of date, and to suggest frequent rechecking of on line sources for changes to the available art instead. This is what gives me concerns.
Resource abuse is not just an issue for pirate hacks, and the first consequence is failed requests (404 and 503 errors) rather than the end of that site, but don't underestimate the danger and irresponsibility of Kodi being greedy. Sites like Musicbrainz enforce limits - must be less than 1 request per second per IP address or all requests get rejected) TADB just runs out of server time and stops working towards the end of the month. And one art site has vanished without trace in the last few years, simply ran out of money for running servers.
I know you know this and are responsible with your addons Ryan, I was not suggesting otherwise, but I do think resource protection needs to be highlighted when there is talk about fetching art, and designed in as much as possible.
Info provider driven refresh:
Having the info provider API tell the scraper the "shelf-life" is an interesting idea, but surely those dates are going to be set to "forever" if the site wants to avoid lots of traffic jambing their servers? Sites have no way to know when a volunteer is going to add more art for an artist or album, or even a plan for adding new art types. Could TADB have told requests made last year that new types would be ready now?
Outdated art:
(2018-02-28, 18:42)DaveBlake Wrote: [ -> ]Do the scraped urls for possible thumb or fanart really get out of date so quickly?
(2018-03-01, 06:41)rmrector Wrote: [ -> ]Yes. Services may add new artwork types (TADB just added clearart and clearlogo), and quite often new artwork is made for existing media...
No doubt with cloud sourced art (and info) new things get added all the time, but how many get removed? By "getting out of date" I meant when the user goes to pick an alternative image from the scraped list of art URLs then find the image does not exist. Sure it could be out of date because there is now more art to pick from.
Perhaps the real questions are:
a) do the info/art providers want Kodi to try to sync with every site change, and do they have the server power for the traffic it could mean?
b) do users want their music art to keep changing?
It is a guess, but I bet the majority of users get art at the beginning, and then happily keep using the default first image of those scraped for years. Others I know like to pick art and then keep it. They like to fill in any blanks, but I don't believe the want to just use different images sometime later.
In the end I am confused by what it is you see as the problem, or propose it is replaced with. My suggestions were a response to what it seemed you wanted, but you declined them, so I have misunderstood. Try again please.
Where to keep scraper results:
Again I offer the music db as
an obvious and useful place to keep common data that relates to artists and albums, as an alternative to having some Python cache sitting in files in userdata. It could even be part of the core scraper processing, ensuring that scraper addons do behave responsibily.
(2018-03-01, 06:41)rmrector Wrote: [ -> ]Caching is for data that is short lived, and this list of previously available artwork is short lived and doesn't need to be robust.
The shelf-life of available art seems to be where we have different perceptions or experiences. In all the testing I have done the available music artwork seems to be very long lived and static. When I scrape the artists now I get pretty much the same possible art as I did 3 years ago. A few blanks get filled in, previously unknown artists have been added, but I can compare the data and it is stable. Perhaps it is down to my taste in music!!
Because of this long life I think it is something that should be in the db, and can only be refreshed manually artist or album at a time.
Your short life view is that it should be only in cache (no list of urls in db at all), and updated whenever an addon (based on data from the site) decides to do it.
Where between these views lies the best solution?
(2018-03-01, 06:41)rmrector Wrote: [ -> ]If you gave add-ons the ability to modify this list they'd still have to update it when the user wants to pick new artwork if the list is old anyway, so giving it to Kodi to cache makes the process more complicated.
In effect you want to refresh the list of available remote art every time the user brings up the art selection dialog. What is wrong with the refresh being manual as it is now?
XML Scrapers:
(2018-03-01, 06:41)rmrector Wrote: [ -> ]Very few people like working with the XML scrapers, so they should probably be phased out.
Yes the reg exp on XML makes my head hurt too. A start has been made on Python music scrapers, but they need more work from someone with Python experience. Feel free to volunteer.
Meanwhile I am glad to say that Olympia does a great job keeping the XML based ones working. While the music resource sites still have XML APIs we can at least keep functioning.