Bionus / imgbrd-grabber

Very customizable imageboard/booru downloader with powerful filenaming features.
https://www.bionus.org/imgbrd-grabber/
Apache License 2.0
2.55k stars 216 forks source link

[safebooru, danbooru] Incorrect names given to ratings #2723

Closed scoliono closed 2 years ago

scoliono commented 2 years ago

Bug description

Safebooru and Danbooru rating descriptions shown on the websites do not match the abbreviations given in the API. Grabber takes this value directly from the API, potentially affecting the save location of images.

Steps to reproduce

  1. Search id:4054397 on Safebooru

  2. Click 'Details'

  3. Rating shows as 'questionable'

  4. Search id:5450477 on Danbooru

  5. Click 'Details'

  6. Rating shows as 'g'

Expected behavior

In both cases, the rating should show as 'general' like it does on both websites: https://safebooru.org/index.php?page=post&s=view&id=4054397 https://danbooru.donmai.us/posts/5450477

I suggest adding a setting that configures how ratings in each booru's API get mapped to a %rating% value. The current categories seem to be pretty unreliable anyway. For instance, Gelbooru just made a new 'general' rating and renamed 'safe' to 'sensitive'.

System information

Additional context

According to the Safebooru api, 'q' means 'general' and 's' means 'safe'

Bionus commented 2 years ago

So from what I understand from this post on Danbooru and this post on Gelbooru:

Do I get that right? BTW, will safebooru now only contain "general" level images? 🤔

Bionus commented 2 years ago

On safebooru, the rating is incorrect because their API returns "rating=q" for this image: https://safebooru.org/index.php?page=dapi&s=post&q=index&limit=20&pid=0&tags=id:4054397 I guess it's not all very ironed out yet on their end.

I'll fix the "g => general" mapping at least.

Bionus commented 2 years ago

According to the Safebooru api, 'q' means 'general' and 's' means 'safe'

It doesn't really make much sense, given "q" is an already existing shortcut for "questionable". Is this Safebooru-specific? 🤔