GSOC Day 9 – Thread and Media Fixes
I didn’t do as much today as usual on Thousand Parsec, due to other business. What I did do, however, was fix the functions I had previously begun in libtpclient-py to work with the media thread and the Media.gz metafile, getting information about available media files and passing it on.
The function I had written was not originally thread-safe, since it accessed a file list that could change in a non-thread-safe manner. I added locks around that, so it will now work properly.
My other task today was to figure out why the media repository didn’t seem to have all the URLs the packets specified for objects. I worked with llnz to work out the bugs, and it turned out that they were pretty much entirely server-side. With those fixed, all of the objects in minisec now have working media!
I also fixed up the function that gets the base media URL to work with multiple games on a single server. It turned out that the game name is specified in the account name, for example: greywhind@tp. There was already a function to extract the game name, so I just had to call it and compare it to the available games list to find the right one.
That’s it for tonight – tomorrow, I’ll try to clean up the panelPicture media code to Mithro’s satisfaction and start looking at ways to differentiate icons and images more effectively. Currently it’s done with names, but it would be better to have either different types for icons and media or to check the sizes of the images.