Page 1 of 1

What is up with JB's birthday fight's data?

Posted: Fri Nov 01, 2013 8:40 am
by Lunkhead
It looks like the fight's key changed from "39+1=jb" when it was a "current" fight to "jbturns40" when it became an archived fight? If I had to guess, it might have been because "39+1=jb" didn't actually work as a fight key... (Some libraries don't percent encode plusses in URLs, assuming they are representing spaces, but in this case the "+" should be encoded as "%2B".) In the Jukebox I don't have things set up to detect changes in the fight key, they remain whatever they were when the fight was current. So for one thing, the Jukebox page:

http://sfjukebox.org/fights/39+1=jb

... is assuming the real archive page should be:

http://www.songfight.org/songpage.php?key=39+1=jb

... when it's actually

http://www.songfight.org/songpage.php?key=jbturns40

Also weird is that the image URLs for the cover art seem to use the old/original key for the fight:

http://www.songfight.org/pix/39+1=jb/cover100.jpg
http://www.songfight.org/pix/39+1=jb/cover400.jpg

Any insight into what happened? I'm not sure how I'm going to deal with this in the Jukebox side... I'm auto generating the real archive URLs based on the fight key, but maybe I need to change that to be a separately stored piece of data so I can make it be inconsistent with the fight key in cases like this...? Ugh.

Re: What is up with JB's birthday fight's data?

Posted: Fri Nov 01, 2013 8:48 am
by fluffy
File URLs never change. I don't know why the archive key changed - probably something had problems with the URL encoding of + and/or = (which needs to encode to %3D). As always, our URL handling is a mess.

Re: What is up with JB's birthday fight's data?

Posted: Fri Nov 01, 2013 8:56 am
by Lunkhead
Yes, URLs are a pain. My code is screwed up because I'm not percent encoding path elements in some cases... which is breaking e.g. my links for the individual songs of the 39+1=jb fight and also the json/m3u links for the artist "?". :/ Fun times.

EDIT: I think my issues are also related to how I am converting path variables into request parameters behind the scene because when I started the Jukebox it seemed like path variables with slashes in them (e.g. artist names like "AB/7A") were screwing things up...

Re: What is up with JB's birthday fight's data?

Posted: Fri Nov 01, 2013 10:30 am
by jb
nerrrrrrds

Re: What is up with JB's birthday fight's data?

Posted: Sat Nov 02, 2013 6:34 pm
by Spud
What you see is what you get. There are no guarantees.