fie Posted February 22, 2010 Share Posted February 22, 2010 Pandora stream saver for linux based on Pianobar. Install instructions in video info. Quote Link to comment Share on other sites More sharing options...
ZigZagJoe Posted February 22, 2010 Share Posted February 22, 2010 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. Quote Link to comment Share on other sites More sharing options...
fie Posted February 22, 2010 Author Share Posted February 22, 2010 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. Quote Link to comment Share on other sites More sharing options...
lopez1364 Posted February 22, 2010 Share Posted February 22, 2010 OH this will work. I'm all over this. Quote Link to comment Share on other sites More sharing options...
ZigZagJoe Posted February 23, 2010 Share Posted February 23, 2010 (edited) 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. Edited February 23, 2010 by ZigZagJoe Quote Link to comment Share on other sites More sharing options...
fie Posted February 24, 2010 Author Share Posted February 24, 2010 (edited) 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? Edited February 24, 2010 by fie Quote Link to comment Share on other sites More sharing options...
ZigZagJoe Posted February 24, 2010 Share Posted February 24, 2010 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... Quote Link to comment Share on other sites More sharing options...
fie Posted February 24, 2010 Author Share Posted February 24, 2010 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. Quote Link to comment Share on other sites More sharing options...
ZigZagJoe Posted February 24, 2010 Share Posted February 24, 2010 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. Quote Link to comment Share on other sites More sharing options...
fie Posted February 25, 2010 Author Share Posted February 25, 2010 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. Quote Link to comment Share on other sites More sharing options...
Pichet Posted March 26, 2010 Share Posted March 26, 2010 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? Quote Link to comment Share on other sites More sharing options...
ZigZagJoe Posted March 26, 2010 Share Posted March 26, 2010 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? Quote Link to comment Share on other sites More sharing options...
Pichet Posted March 27, 2010 Share Posted March 27, 2010 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!... Quote Link to comment Share on other sites More sharing options...
ZigZagJoe Posted March 27, 2010 Share Posted March 27, 2010 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!... this is standalone, just compile and go no browser etc necessary. Quote Link to comment Share on other sites More sharing options...
Pichet Posted March 27, 2010 Share Posted March 27, 2010 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! Forget it! Quote Link to comment Share on other sites More sharing options...
Thedamned Posted April 24, 2010 Share Posted April 24, 2010 Login... Error: Protocol incompatible. Please upgrade libpiano. and I have no idea what to do to fix this. please help. Quote Link to comment Share on other sites More sharing options...
Pichet Posted April 24, 2010 Share Posted April 24, 2010 I guess you're supposed to go there: http://github.com/PromyLOPh/pianobar/archives/master ...but then i'm curious to see what happens next because i've been lurking around patiently for years waiting for a Linux solution to emerge and something tells me it's not going to become a reality just yet... Quote Link to comment Share on other sites More sharing options...
ZigZagJoe Posted April 24, 2010 Share Posted April 24, 2010 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 Quote Link to comment Share on other sites More sharing options...
Thedamned Posted April 24, 2010 Share Posted April 24, 2010 (edited) 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. Edited April 24, 2010 by Thedamned Quote Link to comment Share on other sites More sharing options...
Thedamned Posted May 26, 2010 Share Posted May 26, 2010 hmmm i went to grab a copy for my friend and your site fie doesn't seem to be there anymore. Quote Link to comment Share on other sites More sharing options...
Pichet Posted May 31, 2010 Share Posted May 31, 2010 Well, i think i've read somewhere that Stephen Hawking has predicted TimeShifting will never work under Linux anyway!... Quote Link to comment Share on other sites More sharing options...
griffinmunson Posted September 14, 2010 Share Posted September 14, 2010 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 Quote Link to comment Share on other sites More sharing options...
ZigZagJoe Posted September 16, 2010 Share Posted September 16, 2010 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. Quote Link to comment Share on other sites More sharing options...
spartan7 Posted February 9, 2012 Share Posted February 9, 2012 is this project dead? does piano barfly work on a recent distro such as mint 12 or ubuntu 11.10 or OSuse 12.1?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.