2017-02-07, 17:45
i'm currently working on python based scrapers for artists and albums.
since i'm pretty clueless on the scraping process, i'm hoping to get some feedback from more experienced devs.
so far, i came across a few things i don't quite understand:
1) if the 'prefer online info' setting is disabled, we pass the artistname to the artist scraper.
if the setting is enabled, we pass the artist mbid to the scraper.
why don't we always pass the mbid (if available) regardless of this setting?
ref: https://github.com/xbmc/xbmc/blob/99c25f...#L220-L223
ref: https://github.com/xbmc/xbmc/blob/99c25f...#L569-L583
2) if the album scraper returns no results, we completely skip the artist scraper. why?
ref: https://github.com/xbmc/xbmc/blob/99c25f...#L843-L883
3) if the 'prefer online info' setting is enabled, and 'show song and album artists' is enabled:
this causes the same artist being listed twice in your library if the artistname in your tags does not 100% match the artistname the scraper returns.
for instance "The B-52's" vs. "The B-52s":
3.1) i have all songs of an album tagged with artist "The B-52's"
3.2) we start the album scanner and it returns the mbid for this artist
3.3) we pass this mbid to the artist scraper and it returns info for "The B-52s" and kodi adds it to the db.
3.4) kodi now scans all songs for 'additional' artists. it finds "The B-52's" and checks if it's already in the db... nope
3.5) we pass "The B-52's" to the artist scraper and it returns info for whatever closest match it can find and kodi adds this artist to the db
ref: https://github.com/xbmc/xbmc/blob/99c25f...#L843-L883
since i'm pretty clueless on the scraping process, i'm hoping to get some feedback from more experienced devs.
so far, i came across a few things i don't quite understand:
1) if the 'prefer online info' setting is disabled, we pass the artistname to the artist scraper.
if the setting is enabled, we pass the artist mbid to the scraper.
why don't we always pass the mbid (if available) regardless of this setting?
ref: https://github.com/xbmc/xbmc/blob/99c25f...#L220-L223
ref: https://github.com/xbmc/xbmc/blob/99c25f...#L569-L583
2) if the album scraper returns no results, we completely skip the artist scraper. why?
ref: https://github.com/xbmc/xbmc/blob/99c25f...#L843-L883
3) if the 'prefer online info' setting is enabled, and 'show song and album artists' is enabled:
this causes the same artist being listed twice in your library if the artistname in your tags does not 100% match the artistname the scraper returns.
for instance "The B-52's" vs. "The B-52s":
3.1) i have all songs of an album tagged with artist "The B-52's"
3.2) we start the album scanner and it returns the mbid for this artist
3.3) we pass this mbid to the artist scraper and it returns info for "The B-52s" and kodi adds it to the db.
3.4) kodi now scans all songs for 'additional' artists. it finds "The B-52's" and checks if it's already in the db... nope
3.5) we pass "The B-52's" to the artist scraper and it returns info for whatever closest match it can find and kodi adds this artist to the db
ref: https://github.com/xbmc/xbmc/blob/99c25f...#L843-L883