#musicbrainz-devel

/

      • Gentlecat
        ianmcorvidae: have you seen my messages?
      • looks like you've got some connection problems :)
      • ianmcorvidae
        ah, sorry, I went for a walk
      • and apparently had connection issues as well
      • Gentlecat
      • CallerNo6 gets a 500
      • ianmcorvidae
        presumably since there's no DB, yeah
      • Gentlecat
        well, yes
      • all i need now is db and figure out how to properly run both server and client in background :)
      • ianmcorvidae
        I think we just ran them in screen before
      • oh
      • there's a thing to make sure they keep running
      • lemme grab the one used by reports.mbsandbox
      • Gentlecat
        i'm not a linux guru yet heh
      • ianmcorvidae
        for that I just use: while true; do ./venv/reports/bin/python reports.fcgi & sleep 1200; ps aux | grep reports.fcgi | grep -v grep | awk '{print $2}' | xargs kill; done
      • which is 100% hack, in a real system we'd deploy either of these with uwsgi
      • but it works for this :)
      • obviously change the location of the virtualenv python binary and the name of the .fcgi file
      • (in both places)
      • Gentlecat
        right
      • ianmcorvidae
        grepping for something including your username is also a good idea since of course mjjc's is still running
      • his seems to be in tmux rather than screen, but same idea :)
      • Gentlecat
      • something like this?
      • ianmcorvidae
        you won't want that, since both things will include 'gentlecat'
      • so the client one will kill the server and vice versa
      • I'd have do /home/gentlecat/...venv/bin/python (i.e., use the full path), and then replace 'grep gentlecat' with 'grep client.fcgi | grep gentlecat'
      • (or server.fcgi, for that one, obviously)
      • probably could be done with one grep but it doesn't really matter, so :)
      • Gentlecat
        updated pastebin
      • oh, also full path
      • ianmcorvidae
        yeah
      • the DB is created, incidentally
      • seems to still be 500ing, not sure why
      • oh, I guess I haven't actually done the table-making and such, though you can probably do that
      • I've done what python manage.py create_db would do, anyway, if somewhat more manually
      • Gentlecat
        okay
      • ianmcorvidae
        the pastebin looks right at this point as well
      • if you don't know screen: 'screen' creates a new one, then you can run one of them, then "ctrl-a c" will create a second window in which to run the other, ctrl-a n/p to move to next/previous window and ctrl-a d to detach; screen -ls will list current screens and screen -rd will reconnect if there's only one; if there's more than one you'll have to specify a process number or such, which you can get from screen -ls
      • Gentlecat
        that's some cool magic, looks like i've got both server and client running
      • still getting 500 though
      • ianmcorvidae
        yup, getting errors rather than 502s on both
      • I assume tables/fixtures still need inserting, anyway, but as mentioned I think you can do that without me, so
      • Gentlecat
        yep, i'll try that now
      • ianmcorvidae
        heh, no error logging
      • Nyanko-sensei joined the channel
      • Gentlecat
        looks like my server is not set up properly
      • ianmcorvidae
        yeah
      • hm
      • 'gentlecat' is mispelled in your client config.py
      • but that's the only thing I can see
      • Gentlecat
        ah
      • ianmcorvidae
        and I guess the server's also set to debug mode
      • Gentlecat
        yeah, i just changed it
      • experimenting a bit
      • yay! it's alive
      • ianmcorvidae: is it me or you changed something?
      • anyway, it works now http://gentlecat.mbsandbox.org/
      • CatQuest has left the channel
      • ianmcorvidae joined the channel
      • CallerNo6
        huh. project gutenberg URLs auto-detect as "lyrics". I was wondering how that would work. i.e. wondering if one could use "misc" or something for audiobooks.
      • well, okay, "misc" is deprecated , bad example
      • ianmcorvidae
        Gentlecat: I hadn't changed anything, but good it's working I guess!
      • Gentlecat
        I switched to branch with cover art, should look a bit better now
      • ianmcorvidae
        cool
      • I see a review on the front page that doesn't seem to exist? I guess the 'Random user' user is fake anyway though
      • oh, or it just went away and it was my local HTTP cache, heh
      • Gentlecat
        yeah, I just removed one
      • I guess we need more ways to access review creation and editing stuff
      • ianmcorvidae
        yeah, a prominent 'create review' button or such would be nice (when you aren't over your limits, at least, though probably just disabling it in that case makes sense)
      • Gentlecat
        it's a bit annoying that I need to open /profile/review/ just to edit reviews or add a new one
      • ianmcorvidae
        yeah
      • the onerror for the images isn't getting fired for me in some cases
      • Gentlecat
        yep, I noticed that too
      • ianmcorvidae
        which may be because you need to do what musicbrainz-server does and not add the src until the onerror is there (i.e., add an empty <img> and then add the src with javascript)
      • Gentlecat
        mostly when tab is in background
      • can you link me an example?
      • ianmcorvidae
        of what MBS does? the issue is of course transient, it depends on how caches interact mostly
      • Gentlecat
        yes, on mbs
      • ianmcorvidae
        the MBS onerror/src binding stuff happens around https://github.com/metabrainz/musicbrainz-serve...
      • we replace with a non-image when it fails, rather than changing the src, but same idea
      • Gentlecat
        ianmcorvidae: can you reproduce this case?
      • ianmcorvidae
        probably not deliberately
      • Gentlecat
        I modified my function a bit http://pastebin.com/qkVXSU94
      • ianmcorvidae
        if that's still the onerror callback that won't help, because the issue is the onerror callback not firing
      • Gentlecat
        right, I need to call that for every image
      • ianmcorvidae
        yeah, but if you already have a src set, that's the issue
      • you need to set the error callback before setting the src at all; it looks like what you're doing there is setting the src to the same thing after setting the error callback
      • which won't work because the browser won't rerequest the image if it already knows it's missing, and thus won't fire the error callback
      • Gentlecat
        I updated last pastebin
      • ianmcorvidae
        yeah, that looks right
      • Gentlecat
        but that seems kind of hacky
      • ianmcorvidae
        it definitely is hacky, yeah :/ not much to do about it
      • Gentlecat
        I guess we'll have to wait for API fixes
      • ianmcorvidae
        there's other methods of trying to see if an image loaded correctly (img.complete and image.naturalWidth seem to pop up fairly often, but neither is supported everywhere), none that are events quite the way you'd probably want
      • img error events don't bubble, as I recall, which prevents the potentially-nice option of putting it on <body> or something
      • another option would be something server-side, I guess, that tries to load the image, and if it works return a redirect to it, otherwise a redirect to the not-found image?
      • arguably that'd be a good thing to add to caa.org, even, just an extra parameter for something to 307 to in case of a 404, rather than just 404ing
      • Gentlecat
        but wouldn't server side checking increase page load time?
      • ianmcorvidae
        probably, if it's not within caa.org
      • Gentlecat
        or you mean mirroring cover art archive in some way?
      • ok, got it
      • ianmcorvidae
        by server-side checking I mean just for the image, so it'd not block the main page loading
      • set the src of the image to something like gentlecat.mbsandbox.org/rg-image/<uuid>; and have that endpoint do the checking I mention
      • but doing it within coverart_redirect would probably be best, since that's already designed to return 307s to the image
      • rvedotrc joined the channel
      • Th_rez_ joined the channel
      • UmkaDK joined the channel
      • JonnyJD joined the channel
      • ijabz joined the channel
      • ruaok joined the channel
      • Gentlecat
        ruaok: good news! http://gentlecat.mbsandbox.org/ is up and running :)
      • bandtrace joined the channel
      • ruaok
        Nice.
      • ruaok plays with it
      • rvedotrc joined the channel
      • there is no clear way how to add a new review from the home page.
      • ianmcorvidae
        we were talking about that earlier :)
      • ruaok
        ok. :)
      • Gentlecat: when I rated your review the highlighting is quite clear
      • Did you find this review useful? Yes No (delete your vote)
      • the Yes, seems selected and enabled and the no is greyed out.
      • Gentlecat
      • ruaok
        I selected No, so this is a little confusing.
      • Gentlecat
        let me take a look at voting
      • ruaok
        good good.
      • I quite like how this is coming along. :)
      • Gentlecat
        me too! exciting stuff
      • how about we highlight selected vote with a specific color: Yes = green, No = red?
      • to make it more obvious which option has been selected
      • ruaok
        green and red are intuitive, but garish.
      • the selected option should be one of the non-gray colors that are already used.
      • and the not selected option should be gray
      • Gentlecat
        so just swap them?
      • styles i mean
      • UmkaDK joined the channel
      • ruaok
        lets try that. it might be enough
      • bandtrace joined the channel
      • jesus2099 joined the channel
      • Gentlecat
        ruaok: I updated it, take a look
      • ruaok
        did you change how to get to a review?
      • I can’t get to reivews anymore
      • Gentlecat
        from what page?
      • if you are on album page then yeah, there's an icon missing
      • i fixed it in one of PRs
      • xBytez joined the channel
      • bandtrace joined the channel
      • ruaok
        grrr.
      • thanks for not sending me notifications, bitbucket.