The latest ZXDB update will be applied this evening at 1800 BST. The update takes around 30 minutes, and the site goes down whilst this happens.

How do you know where a front cover image is stored?

This is the place for general discussion and updates about the ZXDB Database. This forum is not specific to Spectrum Computing.

Moderator: druellan

Post Reply
User avatar
bluespikey
Manic Miner
Posts: 969
Joined: Tue Jun 30, 2020 3:54 pm

How do you know where a front cover image is stored?

Post by bluespikey »

For instance, DB entry #1 'Licence to kill' has four Front cover entries :

/zxdb/sinclair/entries/0000001/LicenceToKill(ConLicenciaParaMatar)(Musical1SA)_Front.jpg
/zxdb/sinclair/entries/0000001/LicenceToKill(HitSquad).jpg
/pub/sinclair/games-inlays/Rereleases/l/LicenceToKill(ConLicenciaParaMatar)(ErbeSoftwareS.A.).jpg
/zxdb/sinclair/entries/0000001/LicenceToKill.jpg

The three zxdb paths are prefixed with spectrumcomputing.co.uk, the third one is a complicated path beginning with archive.org. How does one know which path to prefix? Is it just whether it starts with zxdb?

Edit - The third image has a full path of 'https://archive.org/download/World_of_S ... eS.A.).jpg'. Is 'pub' replaced with that long path ?
User avatar
Einar Saukas
Bugaboo
Posts: 3190
Joined: Wed Nov 15, 2017 2:48 pm

Re: How do you know where a front cover image is stored?

Post by Einar Saukas »

That's explained in the ZXDB documentation under section "ADDITIONAL DETAILS ":

https://github.com/zxdb/ZXDB
User avatar
bluespikey
Manic Miner
Posts: 969
Joined: Tue Jun 30, 2020 3:54 pm

Re: How do you know where a front cover image is stored?

Post by bluespikey »

That's just what I needed, thank you very much.
User avatar
Morkin
Bugaboo
Posts: 3292
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: How do you know where a front cover image is stored?

Post by Morkin »

I was trying to learn how to connect to zxinfo.dk to display an image from the game, and ended up doing this:

Code: Select all

// Check if in-game screen URL starts /zxdb/sinclair/ or /pub/sinclair/ and set imageUrl prefix accordingly
			
if (imageUrl[1] == 'z') {
			imageDisplay.setAttribute('src', "https://zxinfo.dk/media" + imageUrl);
					}
			else {
				imageDisplay.setAttribute('src', "https://archive.org/download/World_of_Spectrum_June_2017_Mirror/World%20of%20Spectrum%20June%202017%20Mirror.zip/World%20of%20Spectrum%20June%202017%20Mirror/" + imageUrl.slice(5)); 
			}
I'm not a developer (as you can probably tell :lol: ) so if anyone has a better way then let me know.
My Speccy site: thirdharmoniser.com
Post Reply