Archived

This topic is now archived and is closed to further replies.

fie

Pianobarfly

24 posts in this topic

Pandora stream saver for linux based on Pianobar.

Install instructions in video info.

0

Share this post


Link to post
Share on other sites
Pandora stream saver for linux based on Pianobar.

Install instructions in video info.

Surprised it took so long for someone to finally bite the bullet and do it.

Some suggestions, looking at the source:

- You might want to mangle the stream selection logic so it only requests mp3-hifi - this will cause any client to get 128kbs mp3, and 192kbs if they are subscribers.

- Tagging logic would be nice - take a look at id3ed

- You'll probably want to remove various "bad" path chars, though windows is a bit more restrictive than linux when it comes to that so it might not be needed.

- Artist/album/title fields are too small - i'd recommend putting them in the region of 250 or so, just to be safe. Pandora likes long names, especially when it comes to classical music.

- You might want to disable skip (or handle when it does occur) as it'd leave a truncated stream

Oh, and about that one comment; I'm only here for this forum, never watched the show. Guess i shouldn't bother.

0

Share this post


Link to post
Share on other sites
Surprised it took so long for someone to finally bite the bullet and do it.

Some suggestions, looking at the source:

- You might want to mangle the stream selection logic so it only requests mp3-hifi - this will cause any client to get 128kbs mp3, and 192kbs if they are subscribers.

- Tagging logic would be nice - take a look at id3ed

- You'll probably want to remove various "bad" path chars, though windows is a bit more restrictive than linux when it comes to that so it might not be needed.

- Artist/album/title fields are too small - i'd recommend putting them in the region of 250 or so, just to be safe. Pandora likes long names, especially when it comes to classical music.

- You might want to disable skip (or handle when it does occur) as it'd leave a truncated stream

Oh, and about that one comment; I'm only here for this forum, never watched the show. Guess i shouldn't bother.

And I was so positive that nobody would ever find that. I thank you for proving me wrong. It's so common now-a-days that people run code without checking it first.

I do remove bad path characters.

I was pretty sure that pianobar automatically selected 192 if you have it.

At the moment I'm working on having a better understanding of how input is handled with it. I want to add the very basic feature of volume control. It ought to be quite easy (is the same thing I said when I wanted pianobar to save streams).

But yeah, i will eventually handle skipping, id3 is up there on my list as well (already looked into it), and I will adjust the buffer size for file names etc. next time that I work on it.

0

Share this post


Link to post
Share on other sites
And I was so positive that nobody would ever find that. I thank you for proving me wrong. It's so common now-a-days that people run code without checking it first.

I do remove bad path characters.

I was pretty sure that pianobar automatically selected 192 if you have it.

At the moment I'm working on having a better understanding of how input is handled with it. I want to add the very basic feature of volume control. It ought to be quite easy (is the same thing I said when I wanted pianobar to save streams).

But yeah, i will eventually handle skipping, id3 is up there on my list as well (already looked into it), and I will adjust the buffer size for file names etc. next time that I work on it.

Heh. I was bored, so why not? :P

I saw the spaces being removed (then again, spaces are arguably the worst not-invalid char) but didn't see other chars. OTOH, *nix will accept just about anything in a path name. EDIT: Oh, i see, the diff wasn't updated. Ahhh, you have snprintf instead of sprintf in there too (that's what prompted the comment about buffers).

You could mess about with the system's mixer for a basic control, but there's probably a better way to do it.

Could just delete partial files (go to where the skip is done). Or, you could have another thread take over the socket where it would normally be closed and finish reading it. Took a quick look and didn't find this, though.

ID3 stuff could be put in where you put the rest of the stuff at the very start with the sprintfs; if player.exists == 0, write tag. You'd want to set the initial value of exists to something else though.

Also, it doesn't look like the bit you added in BarPlayerBufferFill (starts with "//fie -- whoo!") respects exists - it'd be overwriting existing files.

0

Share this post


Link to post
Share on other sites

I added volume controls this morning.

, for volume down and . for volume up

I changed the buffer size on names/directories.

said stuff

Why do you say that it doesn't respect exists?

--edit

Maybe the condition believes in existential nihilism?

0

Share this post


Link to post
Share on other sites
I added volume controls this morning.

, for volume down and . for volume up

I changed the buffer size on names/directories.

Why do you say that it doesn't respect exists?

--edit

Maybe the condition believes in existential nihilism?

It looks like it'd be overwriting existing files - in BarPlayerBufferFill.

FILE *fp = fopen(player->tmpname, "ab");

fwrite(data, dataSize, 1, fp);

fclose(fp);

Actually, that'd just be sticking more data on the end of the existing file...

0

Share this post


Link to post
Share on other sites
It looks like it'd be overwriting existing files - in BarPlayerBufferFill.

FILE *fp = fopen(player->tmpname, "ab");

fwrite(data, dataSize, 1, fp);

fclose(fp);

Actually, that'd just be sticking more data on the end of the existing file...

Got ya! We're looking at different code again :D.

If you re-download, it should be in there.

The volume controls on the version online are screwed up but I've fixed that. I also made it so that it doesn't call fopen for each write. Worked on that the first part of the day. I'm trying to see if I can get time shifting working before I upload all of the changes but that will be a few hours from now. I don't think I'm going to be able to get it going today though.

0

Share this post


Link to post
Share on other sites
Got ya! We're looking at different code again :D.

If you re-download, it should be in there.

The volume controls on the version online are screwed up but I've fixed that. I also made it so that it doesn't call fopen for each write. Worked on that the first part of the day. I'm trying to see if I can get time shifting working before I upload all of the changes but that will be a few hours from now. I don't think I'm going to be able to get it going today though.

ah nice looks good - i was looking at the original source that you posted.

0

Share this post


Link to post
Share on other sites
ah nice looks good - i was looking at the original source that you posted.

Ok, NEW VERSION!

Fixed the recalling fopen()

Fixed the volume controls (, down | . up)

Added track position skip ahead. (/)

Right now the skip ahead jumps 128 mp3 frames. I'll work on reversing the track position but that's going to be a lot of work/time.

0

Share this post


Link to post
Share on other sites
Pandora stream saver for linux based on Pianobar.

Install instructions in video info.

I don't get it. At 1st there was no plugins for Flash and/or Java,

then once i had managed to get the GrooveShark music page

loaded and playing, what? Is there not something lighter based

on StreamRipper combined to a Java front-end as StreamRipStar

or else?

0

Share this post


Link to post
Share on other sites
I don't get it. At 1st there was no plugins for Flash and/or Java,

then once i had managed to get the GrooveShark music page

loaded and playing, what? Is there not something lighter based

on StreamRipper combined to a Java front-end as StreamRipStar

or else?

Huh? This isn't for grooveshark, it is for pandora?

0

Share this post


Link to post
Share on other sites
Huh? This isn't for grooveshark, it is for pandora?

Oh well, i thought i'd test this with GrooveShark 1st since it also requires the plugins to be installed.

I didn't get far with it anyway, i guess i didn't allow enough time to work for me since the last time!...

:blink:

0

Share this post


Link to post
Share on other sites
Oh well, i thought i'd test this with GrooveShark 1st since it also requires the plugins to be installed.

I didn't get far with it anyway, i guess i didn't allow enough time to work for me since the last time!...

:blink:

this is standalone, just compile and go no browser etc necessary.

0

Share this post


Link to post
Share on other sites

Oups! I was thinking about 'SongBird' all along!...

PianoBar didn't let me do anything with it, actually.

I've had too much of this stuff already i guess!

:unsure:

Forget it!

0

Share this post


Link to post
Share on other sites

Login... Error: Protocol incompatible. Please upgrade libpiano.

and I have no idea what to do to fix this.

please help.

0

Share this post


Link to post
Share on other sites
Login... Error: Protocol incompatible. Please upgrade libpiano.

and I have no idea what to do to fix this.

please help.

in libpiano/src/piano.c, change PIANO_PROTOCOL_VERSION "26" to PIANO_PROTOCOL_VERSION "27" and recompile.

and, lol pichet

0

Share this post


Link to post
Share on other sites
in libpiano/src/piano.c, change PIANO_PROTOCOL_VERSION "26" to PIANO_PROTOCOL_VERSION "27" and recompile.

and, lol pichet

o and it works again.

woot.

0

Share this post


Link to post
Share on other sites

hmmm i went to grab a copy for my friend and your site fie doesn't seem to be there anymore.

0

Share this post


Link to post
Share on other sites

Well, i think i've read somewhere that Stephen Hawking has

predicted TimeShifting will never work under Linux anyway!...

:blink:

0

Share this post


Link to post
Share on other sites

okay great job! working like a beauty, with one problem. are the .mp3s being encoded in VBR or CBR? there is no possibility of getting these to play on an ipod. i've tried about 5 different softwares across windows and ubuntu to no avail. you know how i can get these files to play mobile? they work fine on the laptop but theres no way of getting them off. if you have a solution please let me know

Griffin

0

Share this post


Link to post
Share on other sites
okay great job! working like a beauty, with one problem. are the .mp3s being encoded in VBR or CBR? there is no possibility of getting these to play on an ipod. i've tried about 5 different softwares across windows and ubuntu to no avail. you know how i can get these files to play mobile? they work fine on the laptop but theres no way of getting them off. if you have a solution please let me know

Griffin

Pandora sends CBR files. Most likely the files are damaged (bad tags/tagging lib?) if they will not play on windows. Winamp and mplayer especially are very tolerant of damaged files.

0

Share this post


Link to post
Share on other sites

is this project dead? does piano barfly work on a recent distro such as mint 12 or ubuntu 11.10 or OSuse 12.1??

0

Share this post


Link to post
Share on other sites