/Games/Updates missing metadata

Need help with your application? Ask here.
Post Reply
User avatar
freelancer
Posts: 17
Joined: Fri Jun 29, 2018 4:53 pm
Location: Sweden

/Games/Updates missing metadata

Post 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?

User avatar
freelancer
Posts: 17
Joined: Fri Jun 29, 2018 4:53 pm
Location: Sweden

Re: /Games/Updates missing metadata

Post 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 =)

User avatar
GamersDatabase
Posts: 20
Joined: Wed Jul 04, 2018 2:48 pm

Re: /Games/Updates missing metadata

Post by GamersDatabase »

I'm struggling with the same issues. Would like to see additional information when pulling images.

User avatar
edirol
Posts: 745
Joined: Thu Jun 28, 2018 1:08 am

Re: /Games/Updates missing metadata

Post 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]"
}

User avatar
Zer0xFF
Posts: 330
Joined: Fri Apr 20, 2018 9:18 am

Re: /Games/Updates missing metadata

Post 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.
Regards
Zer0xFF

User avatar
freelancer
Posts: 17
Joined: Fri Jun 29, 2018 4:53 pm
Location: Sweden

Re: /Games/Updates missing metadata

Post 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.

User avatar
Zer0xFF
Posts: 330
Joined: Fri Apr 20, 2018 9:18 am

Re: /Games/Updates missing metadata

Post 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
Regards
Zer0xFF

Post Reply