Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Announcements (http://www.chiefdelphi.com/forums/forumdisplay.php?f=59)
-   -   ListenTo this. (http://www.chiefdelphi.com/forums/showthread.php?t=14673)

evulish 08-10-2002 17:16

Auhg. GTK will be the death of me :rolleyes:

Brandon Martus 08-10-2002 17:25

oops.. sent it to the registered yahoo address, for your forum account...

evulish 08-10-2002 18:23

o0o. Ok, I got it. I figured it out, actually. Well, besides the md5'd password :) Anyone know how to create md5 sums in C? :P

The configuration is working...now I need to just create the socket stuff (since there's no default browser or anything...the HTTP protocol is simple enough.)

I wish I had a better understanding of C. I don't totally get header files yet :P Though I must say I'm not doing too bad since my own teacher knows nothing about C (yeah...I'm teaching myself...like everything else I have ever learned about computers). Well, it's being created from the helloword plugin on the xmms.org plugins page. But I'm still doing a bit of the work. Most of the plugin layout was done for me...but now it's modified.

I should be done within a week. Or not. I seem to never finish stuff :P (I might actually be done tonight...figuring my headache goes away and I get all nicely registered for the SATs...gotta raise that 1210 into the 1300'S!)

Brandon Martus 08-10-2002 19:13

The winamp script does not md5.
I store the md5 password in the config file. Use this utility to md5 a text string.
You may just wanna do that, instead of actually doing the md5()... unless you want to :)

evulish 08-10-2002 19:39

Well, I'd like to do it in C...just because I can :P Well, at least I might. I'll try. Hehe. Not sure what header file it's in. *Googles* I don't believe it's standard...probably in a crypt package or something. Kernel header? Huh. Whatever.

evulish 08-10-2002 22:13

Auhg...running into major problems...and no clue how to debug :/ Sockets in C suck bad...I WANNA GO BACK TO PERL(#&$(*#$&

evulish 08-10-2002 23:31

Ok...problem with this.

I directly entered this URL into my browser:

http://www.chiefdelphi.com/forums/postmp3.php?USER=evulish?PASS=0c[...]53?ARTIST=dmb?TITLE=dmbljlj

The server replies with 200 (OK). The server didn't update my sig or that page with recently played music. Are you sure it can receive GET? Or did I just b0rk something up. (God I hope it was me...Else I've been working on my program for a few hours for nothing :))

Brandon Martus 08-10-2002 23:35

url is formed wrong.


filename.extension?var=value&var=value&var=value

you had all ?'s, when you should've only had the first one as a ?.

evulish 08-10-2002 23:51

Ahh...that could be the problem :) I'm so incredibly tired.

Brandon Martus 09-10-2002 00:05

You may or may not have to url-encode the string, as well.

ie: spaces = %20, etc..

evulish 09-10-2002 00:28

SCORE! I'm on the way. I've got my socket stuff working perfectly. Now I need to get the Title and Artist from the playlist. Not sure if I can figure out when the mp3 changes. Maybe just check to see the location of the playlist. Hmm. I'll dig around the header files tomorrow. I need sleep. Been working too many hours on this.

Most of the problem was due to my ignorance. I forgot all the extra crap HTTP/1.1 needed. After hours on end of figuring out what was wrong, I got the idea to check the RFC. Now it's all clear :)

It's about 300 lines right now. Eek. I figure it won't break 400.

Not sure how I'll do md5 crap. I don't want to really use the stuff on this site. That would be a lot of work. (Open a socket, send the data, retrieve the data) It's harder than it sounds...especially for me...who has only being programming in C for about 3 days :P

Well, now I know I definitly don't want to be a programmer. Debugging sucks. It really does. Coding doesn't take long, but figuring out why it doesnt work is HARD($# (What with gcc errors like: "problem before line 300" and no, it's not talking about line 299. It's talking about some unknown line between 1 and 299)

Anyways, good night.

evulish 09-10-2002 17:21

Auhg. Okay. I officially give up. I decided it's not worth the effort. It would be much of a pain to complete and no one would use it.

To complete it, I'd need to get the track title and artist. This may not seem hard, but it is. Basically, the closest I can get is getting "Artist - Title" from XMMS. So all I would have to do is seperate them, right? Wrong. What if there was a dash in the Artists' name...so it would be like "Ar-tist - Title" How would I be able to figure out which one was the actual Artist and Title? I don't know. If I were to get the filename, I know enough about MP3's to get all the data from the file. But I don't know enough C to be able to do that.

I would also need to be able to get the Md5 sum of the password. I would have to find a header file (or make one myself) for md5. Then I would have to find out how to use it. My other option would be to use Brandon's md5 thing...but that would require another socket...which took me 10 hours to do the first time. I'd rather not do it again.

If anyone knows C and would like this for XMMS, I'd be happy to send you the sourcecode and point you in the right direction. I just don't have enough time/effort/knowledge to complete this.

Brandon Martus 10-10-2002 22:26

VERSION 1.1 has been released!

Go here to download the new version.

To upgrade, just erase your 'ListenTo' directory in C:\Program Files\Winamp3\Scripts ... and then re-install. Don't forget to edit the XML file like before, and change your username/password.

Fixes/Updates
  • reports song after 10% of song has played, instead of instantly on song change
  • customizeable URL, in case it ever changes (which it shouldn't..but anyway)
  • open source. steal the script if you wish. its included in the zip (ListenTo.m)

reply here if you have any problems, etc.

Brandon Martus 17-10-2002 01:40

Hey Mac users...

The iTunes 3 AppleScript is 99.5% done.
I just have to figure out a way to escape quotes in a string
with AppleScript, and it should be ready to distribute.

Anybody know how to escape quotes in a string with AppleScript? :D

Brandon Martus 17-10-2002 18:50

ListenTo.mac :)

Its over on the ListenTo download page. Instructions are there also.


All times are GMT -5. The time now is 02:46.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi