Page 1 of 1

/Games/Updates missing metadata

Posted: Sat Aug 04, 2018 2:47 pm
by freelancer
A call to /Games/Updates might yield an entry like this:

Code: Select all

{
"edit_id": 13604,
"game_id": 60548,
"timestamp": "2018-08-03 21:49:33",
"type": "boxart",
"value": "boxart/front/60548-1.jpg"
}
As you may have noticed, it's missing both the "side" and "resolution" metadata for the image, which is returned with a call to /Games/Images. While the "side" value can be inferred from the file path in this case (though I wouldn't wanna rely on that), the resolution doesn't seem possible to get without an extra API call for each game that has updated image(s).

Could you please add this metadata to the /Games/Updates endpoint?

Re: /Games/Updates missing metadata

Posted: Sun Aug 05, 2018 11:37 am
by freelancer
Just thought of another potential issue. How do I know if the above entry is a new image or a replacement for an existing image? And how do I know if an image has been deleted?

Maybe I'm just being dumb, in which case feel free to let me know =)

Re: /Games/Updates missing metadata

Posted: Sun Aug 05, 2018 5:23 pm
by GamersDatabase
I'm struggling with the same issues. Would like to see additional information when pulling images.

Re: /Games/Updates missing metadata

Posted: Mon Aug 06, 2018 2:19 am
by edirol
freelancer wrote:
Sun Aug 05, 2018 11:37 am
And how do I know if an image has been deleted?
An example

Code: Select all

{
        "edit_id": 14250,
        "game_id": 19920,
        "timestamp": "2018-08-05 18:40:34",
        "type": "boxart",
        "value": "[REMOVED]"
}

Re: /Games/Updates missing metadata

Posted: Mon Aug 06, 2018 1:48 pm
by Zer0xFF
what [mention]edirol[/mention] stated is correct, If an image was getting replaced you'd get the `[REMOVED]` value before hand, if no associated image existed then it would just list the link.

unfortunately with current update api the limitation of knowing which specific image was removed doesn't exist, you'd just have to infer it from the name of the image that was added, the same goes to side, these things ill try to address with the next revision of the update API.

Re: /Games/Updates missing metadata

Posted: Mon Aug 06, 2018 2:46 pm
by freelancer
Yeah that sounds a bit suboptimal, but good to know you're aware of it and trying to solve it.

For the time being, I'll probably just fetch the full info for any games that have an artwork update, to ensure I have a consistent database. Too many ways the guessing/inferring could be wrong.

Re: /Games/Updates missing metadata

Posted: Mon Aug 06, 2018 3:03 pm
by Zer0xFF
you've the limit and you're free to use it how you see fit.


however, naming should be consistent that it shouldn't present any issues I can think of.

aka box art would always contain side in the name, and ALL images would always be named `games_id-N.jpg`/`.png`(png is only used for clearlogo)

Code: Select all

https://cdn.thegamesdb.net/images/original/screenshot/60546-3.jpg

https://cdn.thegamesdb.net/images/SIZE/TYPE/[SIDE/]games_id-N.jpg