StationRipper Homepage
Forum Home Forum Home > StationRipper - Devs > Code
  New Posts New Posts RSS Feed - streamripper 1.61 is up
  FAQ FAQ  Forum Search   Register Register  Login Login

Forum Lockedstreamripper 1.61 is up

 Post Reply Post Reply
Author
Message
gregsharp View Drop Down
Beta Tester
Beta Tester


Joined: 01 March 2004
Location: United States
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregsharp Quote  Post ReplyReply Direct Link To This Post Topic: streamripper 1.61 is up
    Posted: 07 September 2004 at 12:19am
Hi, I finally got streamripper 1.61 finished. The downloads are posted here:

http://streamripper.sourceforge.net/openbb/read.php?TID=995

Also it's tagged in CVS with "sripper-1_61_0". Give a holler if you have any problems/bugs/whatever!

Greg S
Back to Top
gratajik View Drop Down
Music Guru
Music Guru
Avatar
Admin

Joined: 01 October 2003
Location: United States
Status: Offline
Points: 2415
Post Options Post Options   Thanks (0) Thanks(0)   Quote gratajik Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2004 at 7:56pm

Hi Greg,

I'm showing a nasty memory leak, and I THINK it's in strip_invalid_chars(char *str)

This bit of code:

   for(int j = 0; j < 500; j++)
    {
        char *p = new char[255];
        p[0] = NULL;
        strcpy(p, "This is a test");          ;       
        strip_invalid_chars(p);
       
        delete []p;
            
    }

Leaks "This is a test" 500 times.  If I remove the strip, it doesn't.  Are you seeing this? I actually have copied your function to a local function in the SR stuff (as including it is a pain, but it should be the same).

Adding:

    free(w_in);
    free(w_invalid );

Seems to fix it.

This doesn't actually show up as problem very quick, but if you rip 20 streams at once it gets nasty quick.

Thanks,

-Greg

Back to Top
gregsharp View Drop Down
Beta Tester
Beta Tester


Joined: 01 March 2004
Location: United States
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregsharp Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2004 at 11:44pm
I plead total amnesia on this. Thanks for the fix!

Greg
Back to Top
gratajik View Drop Down
Music Guru
Music Guru
Avatar
Admin

Joined: 01 October 2003
Location: United States
Status: Offline
Points: 2415
Post Options Post Options   Thanks (0) Thanks(0)   Quote gratajik Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2004 at 12:08am

Hehe, just glad I found it.  I've been stress testing V2.0 for the last week, and was wonder what was up :P

-Greg

Back to Top
gratajik View Drop Down
Music Guru
Music Guru
Avatar
Admin

Joined: 01 October 2003
Location: United States
Status: Offline
Points: 2415
Post Options Post Options   Thanks (0) Thanks(0)   Quote gratajik Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2004 at 8:02pm

Two other things -

- The period symbol isn't included in that function, for windows - was that intended?

- We're seeing a LOT of errors about SR_ERROR_NO_HTTP_HEADER.  Users are reporting that the live version of StationRipper isn't seeing that, but the new one is.  Any ideas?

Thanks,

_Greg

Back to Top
gregsharp View Drop Down
Beta Tester
Beta Tester


Joined: 01 March 2004
Location: United States
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregsharp Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 10:35am
The period should be ok in windows filenames. I strip it from unix because a leading period is used for hidden files.

Do you have a URL for SR_ERROR_NO_HTTP_HEADER?
Back to Top
gregsharp View Drop Down
Beta Tester
Beta Tester


Joined: 01 March 2004
Location: United States
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregsharp Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 5:12pm
By the way, I think I can explain the change.
It's these lines added to socklib.c.

//look for the end of the icy-header
if (!strstr(buffer, "icy-") && !strstr(buffer,"ice-"))
    continue;

There are some streams which could not be read because
they have \r\n\r\n header ending before the icy
information (then they have another header ending).
But I guess that the above fix was not good.
Back to Top
gratajik View Drop Down
Music Guru
Music Guru
Avatar
Admin

Joined: 01 October 2003
Location: United States
Status: Offline
Points: 2415
Post Options Post Options   Thanks (0) Thanks(0)   Quote gratajik Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 5:51pm

Well, this is interesting.

The way the URL to rip changed in this version (in StationRipper).  It APPEARS that some of the URL's on some of these stations are invalid.  If I run the old console against the URL the new one is getting, it also gets the error.

Example:

The 80's channel

[playlist]
numberofentries=4
File1=http://64.236.34.196:80/stream/1040
Title1=(#1 - 1/9584) CLUB 977 The 80s Channel (HIGH BANDWIDTH)
Length1=-1
File2=http://64.236.34.4:80/stream/1040
Title2=(#2 - 2075/18249) CLUB 977 The 80s Channel (HIGH BANDWIDTH)
Length2=-1
File3=http://64.236.34.67:80/stream/1040
Title3=(#3 - 3243/14770) CLUB 977 The 80s Channel (HIGH BANDWIDTH)
Length3=-1
File4=http://205.188.234.66:8010
Title4=(#4 - 10/10) CLUB 977 The 80s Channel (HIGH BANDWIDTH)
Length4=-1
Version=2

The first bold one I get a "not Found".  The second I get a  no header error.  The others work.

I can roll with this - When the user tries to rip, I'll just start at the first and go through until one works. Not fun, not sure what's up...

If I run in WinAmp, I get the same results.  But it works from the main PLS file.  Sooo.. does it just also go through them, or does it always pick #2 or something?

I'll let you know what I find, but ATM it looks like the console is doing what it should :)

-Greg

Back to Top
gregsharp View Drop Down
Beta Tester
Beta Tester


Joined: 01 March 2004
Location: United States
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregsharp Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 7:18pm
Hmm, very interesting. Here is the http header for number #4 (bold #2):

HTTP/1.0 302 Found
Content-type:text/html
Location: http://64.236.34.196:80/stream/1040

The 302 means "redirection". Streamripper should handle this, and make a second try with URL http://64.236.34.196:80/stream/1040.

Because of the change to socklib the redirection doesn't work (although for this stream, the redirection wouldn't have worked anyway, just that the error would have been different). There is another problem with my socklib change, which is live365 streams. They don't have an "icy" or "ice" field.

Some additional information, I found out why some http headers have icy information after the "\r\n\r\n". This happens with certain flavors of proxy servers. The proxy interprets the headers, and the ones which are unknown get moved to the data portion (i learned about this on the xmms forums).

Concerning the pls file, I had always assumed (i don't know why) that the (2075/18249) means that the stream has room for 18249 listeners and 2075 are being served.
Back to Top
gratajik View Drop Down
Music Guru
Music Guru
Avatar
Admin

Joined: 01 October 2003
Location: United States
Status: Offline
Points: 2415
Post Options Post Options   Thanks (0) Thanks(0)   Quote gratajik Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 7:22pm

Yeah.  Annoying.  Wonder what's up? A lot of stations are doing this.

Oh well.  No biggy, the version I'm putting out tonight will deal with this.  Nice actually, in that it will just start at the first and go until the end or it finds one it can rip.  User doesn't see anything unless it fails.

-Greg

Back to Top
gratajik View Drop Down
Music Guru
Music Guru
Avatar
Admin

Joined: 01 October 2003
Location: United States
Status: Offline
Points: 2415
Post Options Post Options   Thanks (0) Thanks(0)   Quote gratajik Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2004 at 6:36pm

Hi Greg,

http://www.ratajik.com/StationRipper/forum/forum_posts.asp?T ID=737&TPN=1

Afer playing with this a bit, it appears that the FIRST track name isn't getting used correctly.  I actually debugged in enough to see that, in like ripstream_rip(), the name IS there, but it's not getting used.  I'm not that familar with that part of the code... any idea what's up?

I don't know if it's always done this, as before the first song would never be "complete", or the station plays a short promo before playing the current song, so the user would never see this.  But the new version copies incomplete, so it would be nice to have the correct song name :)

If I have time I'll debug into this some more - let me know if you have any ideas.

Thanks,

-Greg

Back to Top
gregsharp View Drop Down
Beta Tester
Beta Tester


Joined: 01 March 2004
Location: United States
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregsharp Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2004 at 11:31pm

Hi. Yes, this is true. Try changing ripstream_rip() from this:

ret = rip_manager_start_track(m_no_meta_name, m_track_count);

to this:

ret = rip_manager_start_track(m_current_track, m_track_count);

I fixed it in streamripper some time after 1.61.

Greg
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.15
Copyright ©2001-2013 Web Wiz Ltd.

This page was generated in 9.039 seconds.