lets see here i noticed that in the win32 client to do list that there was a need to get the auto detect to work with windows media player 7, well since this is what i use for my mp3's i created a work around here are some things to note (if they haven't been mentioned b4). first off windows media player isn't a standard windows program ie; text boxes don't have standard window handles, everything is called "windows media player" when doing an api spy on it - so to get it to work you need to make a custom skin. to solve this on my system i created a custom skin that placed the song title on the title bar of the windows media player ( something that microsoft should have done in the first place ) and the code i used in the skin was
metadata.value = "Track: "+player.currentmedia.name;
metadata.value += " By: "+player.currentmedia.getiteminfo("author");
metadata.value += " Length: "+player.currentmedia.durationString;
view.title = metadata.value
and its output is Track: My Descent Into Madness By: Eels Length: 03:54
in the title bar
and as anyone else knows that you can easily pick up text from a title bar that always begins with the word "Track: " so in my vb client that i use for lj i used windows api to search for any window that begins with "Track: " and grabbed the rest of the text inside there the api code i used is not on my work computer doh i was going to post it but instead of wasting room and such i wont he he. ummm if anyone wants me to let me know, but im sure everyone on here knows win32 api well enough to know how to do this. but as to my point, if we are going to give the public an easy way to grab the song from windows media player they would have to use a special lj skin to do it hmmm what an idea maybe even letting this skin post lj entrys (just an idea) it is possible.
on the win32 client, even though i hate c++ and don't use it much i figured out how to get it to work with windows media player. see what you think (you still need to find some way in the skin to pass the value either in the title bar or where ever etc) tell me what you think
// code blurb
// is MediaPlayer open?
//hwindow = ::FindWindow("Media Player 2",NULL);
hwindow = ::FindWindow("WMP Skin Host",NULL);
//song = GrabPlaying(hwindow, "- Windows Media Player", 22, 3);
song = GrabPlaying(hwindow, "WMP Skin Host", 5, 3);
// end blurb
// i took out the "is this mp3" stuff cause i didn't need it
// return song;
song = this_title;
i re-edited the code cause it looked like crap inside the post window
this is just the parts i changed
Yeah, I'm back. I see I missed the whole visions vs. everybody fight. I'm really disappointed that I leave for a few days and everybody starts bitching at each other. Tim has made more contributions than just the windows client ... he didn't deserve all the crap he got. On the other hand, he was being as immature as everybody else was. He really wants us to snail-mail him a package with a floppy and self-addressed stamped envelope to get the LJ client source? If that's what it takes, I'll do it, but that was the final straw as far as I was concerned.
The only way for a big group of volunteers to be able to work together is to be polite and respect each other. I noticed a few people being particularly rational (like foobar), but seriously ... in the future don't bitch out people that are trying to help, no matter how much you might not like them personally. All input should be welcome at any time.
Also, I noticed a number of times where people tried to say I'd said one thing or another in the past. If you're going to say I took a certain position in the past on something, try and cite it (I know that's difficult with the lack of searching tools that LJ provides now...). I just got kinda frustrated by people who were saying I'd said something when I had no memory of even hearing the issue, much less taking a position on it. But maybe I just have a bad memory too... not a big deal.
Got stan back from ASL with a new sexy-lookin' serverworks motherboard, since the old one was defective. They're also going to replace kyle for free. (but we have to pay the $50 shipping again probably?) They told me they were just going to replace the motherboard and explicitly told me they'd leave the OS on there, but they lied ---- the disk was wiped clean and Linux Mandrake is on there in place of FreeBSD. So, I'm in the middle of a FTP FreeBSD install. (Note to self: this is getting tedious... burn a CD) I kept a document on how I built the servers last time, so it'll be easy this time around. (.... but no less tedious and boring.)
Apparently while I was gone a number of aspell processes locked up and ate all the CPU on the two webservers, killing the site. We can do a little hack to kill them every minute, or set an alarm in the parent to kill it if it doesn't return, but those are hacks. The real solution is what I want to find.... is it aspell? Does an aspell upgrade fix it? Is there anything in the changelog hinting at the bug we were seeing? I tried running a few thousand recent journal entries through LJ::SpellCheck, but none locked up. So I'm guessing the lockups are rare, and the people trying to post the entry containing the bad data that confuses aspell are never making it through, and are never turning off the spell checker. Still, I'm not sure of anything yet.... this remains a problem, and I think I'll do something hacky like the alarm, but also log to a text file the text trying to be spellchecked should the alarm go off, so we can fix it in the future. Actually, I don't want to do this---- anybody else up for it? appending to /home/lj/var/ljspellcheck.err.log would be a good location to dump info.
I'm going to try and get the source out today, along with a lot more documentation in it, and the INSTALL file that ender's been working on.
I want to add a new widget type in the LJ::Poll code .... "scale". Right now if you want to ask, "On a scale from 1-10, how good is LJ at answering your questions?", you'd have to do a radio or a dropdown and have 10 different options. I think this would be easier: <lj-pq type="scale">1-10</lj-pq> That way we don't need 10 rows in the database for each question in a survey. If we had a survey with 20 of these type of questions, that'd not only be a pain in the ass, but a waste of space in the database. Also, this lets us show the mean/median/stddev since we know all the answers will be numbers.
In printing out messages from the livejournal server I noticed something slightly curious in the list of mood id's. For the variable
mood_number_id, variables up to
mood_49_id all have the same value as "number" (that is,
mood_50_id has a value of 51, and all mood_id's up to 92 have a value that is off by one. From 93 upwards, all values are off by two (so
This isn't a huge problem and can be easily worked around, but can be a little confusing if you're not expecting it. Anyone know what causes this, and would it be easy to fix?