Jump to content

ZigZagJoe

Dedicated Members
  • Posts

    895
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ZigZagJoe

  1. Huh? This isn't for grooveshark, it is for pandora?
  2. To play pandora in mplayer is simple enough - you just need to get it the audio data by either downloading the data yourself and feeding it to mplayer via a pipe/stdin/etc or you can just give the url (you loose a bit of control over state that way, though) The "tricky" bit is getting to that point to begin with. The sequence to get audiourls goes something like this: 1. misc.sync: receive server's timestamp and store it for further use 2. listener.authenticateListener OR listener.createListener (anon mode, also step 1 for registering) 3. station.getStations: get a list of stations and store it 3a. if no stations, get a choice from the user and call station.createStation, which returns the new stations's data; same format as getStations'. This is also used to load shared stations 4. playlist.getFragment with a station ID that belongs to the current user. Returns 4 songs with encrypted audio urls. Technically should be using getFirstFragment for the first use of a station, but I don't. 5. decrypt the audio URL, and commence playback. 5a. send feedback with station.addFeedback with info contained in the songinfo dict other rpcs: listener.addTiredSong,station.addSeed,station.setStationName,station.removeStati on,station.transformShared,listener.register,listener.getListenerResult All postdata is encrypted with blowfish. Replies are in plain xml. Audio urls are encrypted (last 48 chars only) with a separate key. All requests except sync require a timestamp, give it the stamp you got from sync offset to the current time. In the URL, RID is some sort of route id. When syncing, I set it to String.Format("{0:0000000}P", UnixTime % 10000000) and have done. All i know about it is it must end with P. listenerId and authToken are used in most requests; these are obtained by any request that returns userinfo: listener.authenticateListener, listener.createListener, listener.register, listener.getListenerResult. Instead of a complete re-implementation of pandora (like i did), you might try wrapping pianobar, another complete reimplementation, for linux, maybe you can get it to compile under cygwin. As i understand it, it just uses letters etc for commands so it would be a bit simpler to use.
  3. To use this for that end, you'd need to use one of those programs which records from your sound card. A quick google turns up http://www.sdstechnologies.com/ The concept in itself is interesting, i might play around with making a shoutcast/icecast emulation for pandora (a client which only outputs over shoutcast) for the lols.
  4. See if you can connect to the internet via internet explorer. I'm thinking your proxy configuration is bad, and it's causing this to fail (seen it happen before).
  5. Update deployed (once more, to fix a small bug): More bugfixes and general improvements to function. Grooveshark will now handle oddly named files properly now. Saver2: Fixed handling of songs with a backslash in the name Saver2: GoogleScraper moved into Saver2 namespace, Genre changed to GenreResult Saver2: Added several genres to scraper, and scraper behavior improved. Saver2: Original value will be used if scraped value is weak; weak results will only return the highest. Saver2: Very weak scrape results will now use the song's genre if it is available Saver2: Upgradable songs will be upgraded automatically even if in wait for approval mode now Saver2: Added handling for duplicate pending songs Saver2: Songs will no genre will be handled properly now Saver2: Moved genre completetion into songinfo.complete Saver2: Removed date code from update check Sproxy: GetImage should hopefully behave a little less stupidly SongMgr: Song's folder structure will now be reset when applying changes, this will fix youtube-derivied files being in odd locations Grooveshark: Will now read genre and year from file, in case of esoteric songs not having a strong scrape result Grooveshark: Unicode escape sequences will now be read properly, allowing files containing odd chars to be saved once more. Youtube: & will now be replaced in titles Changelog: Time machine re-calibrated and correct dates restored. ----- 03/19/10: 1.3 build 687 (nonvital) Songza: Songza sets are now supported. Songza: Error responses now handled.
  6. A song by that ID has already been added but not approved. Probably refreshed the youtube page or something. Added a fix for this; in addition, if the new song is bigger than the current (pending) song it will replace it (this would happen with youtube a bit when using approval mode/edit details). Also, files that already exist and can be upgraded (if the setting is enabled) will be upgraded without needing to pass through the queue now.
  7. http://pastebin.com/z1ySDBAb
  8. A custom control (C#). A thread forces an update every few milliseconds (i forget the exact value). Each time, it draws a bunch of slanted lines (45 degrees); the width of each "segment" is controlled by the height of the control. Then the "moving" counter is incremented once (for each time it is updated), and if it goes over height x 2 it is set to 0. I can send you the source if you like, it's a lot simpler than it sounds (i suck at the explaining). And yes, It's been brought to my attention that the client is a bit ugleh. Working on a pitiful attempt at skinning.
  9. What media player are you using? I did a few tests, i'm guessing their id3 lib is non compliant. Or an old version. Will see if i can find anything in the source. mplayer: worked fine winamp: worked fine WMP: worked fine VLC: worked fine mplayerc: did not read tags properly on some, but most of the time was OK Looking in a hex editor, they all have that prefix; I suspect it is regarding the encoding of the string. Not really much I can do to fix this (outside of go back to the old id3 lib, which is not an option). Yeah, it is the encoding that is used. The first byte, 0x01 means UTF-16 [unicode] with BOM (Byte Order Marker). 0xFF 0xFE means it is encoded as Little-endian. Don't think it could be changed. Also, just released a nonvital update: 05/18/2010: 1.3 build 687 (nonvital) Bugfixes, fix for youtube. SongMgr: Song metadata can now be edited on the approval dialog Saver2: Fixed upgrading not respecting the setting properly Saver2: Fixed encoder timeout being 50mins instead of 5 Saver2: Removed Length property from songinfo, as it was unneccisary + unused SProxy/Saver2: Changed access levels of stuff that does not need to be used by plugins Tor: Added -CC for certain country codes, and added a check for avoiding duplicate tortunnel instances Fader: Will now work. (bad setting) Youtube: Fixed id3 header being written resulting in files being unreadable. A tool is available to fix this, mail me. The tool to fix broken flv files is available at http://zzj.itf-inc.com/s2/misc/FlvId3Fix.exe
  10. If you dont need a proxy to get to the internet, you don't need to mess with that.
  11. I can do that. I will also make the metadata (knownsongs, knownstations, and pendingsongs) available. Mailed a link.
  12. If you can use IE to get to the internet already, go to Tools->internet options->connections->lan settings->advanced.
  13. The post body is implicitly included, as is the RID argument on the URL. PandoraXMLResult ret = PostXMLRPC("&lid=" + UserInfo["listenerId"] + "&" + /* url */ "method=addFeedback" + "&arg1=" + SID/*station id*/ + "&arg2=" + song.ID + "&arg3=" + (song.ContainsKey("matchingSeed") ? song["matchingSeed"] : "") + "&arg4=" + (song.ContainsKey("userSeed") ? song["userSeed"] : "") + "&arg5=" + (song.ContainsKey("focusTraitId") ? song["focusTraitId"] : "") + "&arg6=" + "&arg7=" + (Love ? "true" : "false") + "&arg8=false", /* body */ "<?xml version=\"1.0\"?>" + "<methodCall><methodName>station.addFeedback</methodName>" + "<params><param><value><int>" + SyncedTime + "</int></value></param>" + "<param><value><string>" + UserInfo["authToken"] + "</string></value></param>" + "<param><value><string>" + SID/*station id*/ + "</string></value></param>" + "<param><value><string>" + song.ID + "</string></value></param>" + "<param><value><string>" + (song.ContainsKey("matchingSeed") ? song["matchingSeed"] : "") + "</string></value></param>" + "<param><value><string>" + (song.ContainsKey("userSeed") ? song["userSeed"] : "") + "</string></value></param>" + "<param><value><string>" + (song.ContainsKey("focusTraitId") ? song["focusTraitId"] : "") + "</string></value></param>" + "<param><value></value></param>" + "<param><value><boolean>" + (Love ? 1 : 0) + "</boolean></value></param>" + "<param><value><boolean>0</boolean></value></param>" + "</params></methodCall>" ); b is handled by that crypto class i told you about - Pandora.Crypto and DecryptStr/EncryptStr The easiest way to get an authtoken would be to sniff pandora's - I'm writing this on the fly, so you'll probably need to modify it to get it to work: string GetTokenFromXML(byte[] postdata) { XmlDocument doc = new XmlDocument(); doc.LoadXml(Pandora.Crypto.DecryptStr(postdata)); // decrypt body and load in the XML doc XmlNode at = doc.SelectSingleNode("/methodCall/params/param/value/string"); // select the first string argument, which is the auth token in almost all cases except some like sync, authentication, and anonymous login if (at == null) throw new Exception("Did not find authtoken"); return at.InnerText; // done? }
  14. Reading: (from songinfo.frommp3) public static bool FromMp3(string file, ref SongInfo s) { TagLib.File f; try { f = TagLib.File.Create(s.TempFile, "audio/mpeg", TagLib.ReadStyle.None); } catch { s = null; return false; } string Artist = (f.Tag.Performers != null && f.Tag.Performers.Length > 0) ? f.Tag.Performers[0] : null; string Title = f.Tag.Title; if ((Artist != null) && (Title != null)) { s.Artist = Artist; s.Title = Title; s.Album = (f.Tag.Album != null) ? f.Tag.Album : "Unknown Album"; return true; } return false; } Here's a somewhat butchered version of the tagging code. for aacplus, use f = new TagLib.Mpeg4.File(Song.FileName) I use explicit calls because it seemed easy enough. TagLib.File f = new TagLib.Mpeg.AudioFile(Song.FileName); f.Tag.Title = Song.Title; f.Tag.Performers = new string[] { Song.Artist }; f.Tag.Album = Song.Album; f.Tag.Comment = "Ripped by Saver2 (" + Song.Source + ")\r\n"; if (Song.Genre.Contains("/") || Song.Genre.Contains("\\") || Song.Genre.Contains("|") || Song.Genre.Contains(",")) { string[] glist = Song.Genre.Split('/', '\\', '|', ','); for (int i = 0; i < glist.Length; i++) glist[i] = glist[i].Trim(); f.Tag.Genres = glist; } else f.Tag.Genres = new string[] { Song.Genre.Trim() }; if (Song.Year != 0) f.Tag.Year = Song.Year; if (Song.AArt != null) { try { MemoryStream ms = new MemoryStream(); Song.AArt.Save(ms, System.Drawing.Imaging.ImageFormat.Png); Picture Cover = new Picture(new ByteVector(ms.ToArray())); Cover.Type = PictureType.FrontCover; f.Tag.Pictures = new Picture[] { Cover }; } catch (Exception e) { Funcs.Log(Song.ID, "Failed to tag w/ picture ---> " + e); } } f.Save();
  15. Right, taking a look at it. Rather bizarre (in that it's pretty much PS grafted on), but if it works, shrug. Known songs is keyed by URL for the sake of dealing with turbo mode/song requests. in logit - you can also call Saver2.Funcs.Log(string,string) to do prefix (or go all the way and call Proxy.Funcs.Log) For getvalue and setvalue - if you change the assembly name to something like blah.Pandora.dll settings should let you access pandora's settings without mangling. I personally thought the settings class was one of my greater triumphs. You'd use Pandora.Crypto.DecryptStr() to decrypt the request body. It really was not meant to be public (internal), but ah well. I'd recommend enabling WriteXMLs in advanced settings then listening to a few songs on pandora (sending feedback) to get a basic idea of the responses sent.
  16. Hmm, no, I didn't get a mail. Did a cursory check of the spam box but saw nothing. Ahhh, oh wait, i see it here. I must have missed it and did read-all so i never saw it. Network config is only enabled in the context of the standalone version - it isn't enabled in the plugin version because all requests are made to go through sproxy. Pandora.exe (the standalone version) is packaged in a seperate installer on my site. There is no function saver2.log - do you mean, SaverPlugin.Log? If so, yes, it could be made virtual. Taglib-sharp.dll replaces ID3. I'd strongly recommend using it instead; in addition to supporting many formats seamlessly it also reads tags without fail. The old one had problems reading tags (and outright ignored id3v1, iirc). The move also allowed me to remove mp4tags.exe so there is now just one tagging path (as opposed for one for mp4 and one for mp3, both radically different). I can give you some basic code for reading and writing tags with it if you like. Alright. "?saver/catch&song=" in any request will be interpreted as an approval rpc. That is, if there is a matching song, it will be "approved" and move on to be tagged encoded etc. song can be either an id OR "%artist% %title%" where artist and title are replaced with the song's info. "?saver/dismiss&song=" is the same, except if the song is present it is dismissed - removed from queue and temp file deleted. These are the only global urls supported. The first is used by the download button which can be embedded in the pandora webpage by the pandora plugin. The second is not used. There is still no way to send feedback directly to pandora. If you captured a request, decrypted it, and got the authtoken you could presumably use it from there to send feedback, though, assuming you have the complete song metadatas as well. What I meant by feedback being handled by saver2 is that plugins are still responsible for parsing the requests (all plugins are read-only, as of yet), but if they can correlate it to a song's metadata it would be then passed to saver2 which acts on it according to the settings on the ratings tab. (approve it, dismiss it, delete it). Before, this was done all internally in the pandora plugin. This corresponds with the addition of the Rating field in songinfo.
  17. One more update is up, because i kinda forgot to include the new plugins. Oops. And it was updated. AGAIN. Because an experiment at skinning was accidentally included.
  18. Update released. 03/14/10: 1.3 build 664 Lots o' bugfixes. Added plugins for songza.com and last.FM Client: Added a plugin API Client: Fixed the welcome dialog not dismissing properly Client: Fixed some odd streamplayer behavior Client: Fixed proxy passwords not working Client: New icon, thanks to Scorpion Grooveshark/Slacker: Fixed DontUseProxy setting Grooveshark: Fallback uses SongInfo.FromMp3 to get tags now Last.FM: First release. Previews will NOT be saved. Pandora: Removed all feedback handling (moved into saver2) Pandora: Removed Album art wait Playlist: Now uses SongInfo.FromMp3 to get tags Saver2: Tagging is now handled by taglib - mp4tags is no longer neccisary and will be deleted by the installer Saver2: Added SongInfo.FromMp3 for simple plugins Saver2: Added exemptions for google and amazon Saver2: Fixed blacklisted songs' temp files not being deleted. Saver2: Feedback is now handled by saver2 Saver2: Playlists will not be rewritten on start; only when setting is changed Saver2: Fixed exit warning dialogs being launched offscreen Slacker: Added exemptions Songza: First release. Works with radio; songza.org is covered by youtube plugin SProxy: Fixed exemptions not working properly with a http proxy Any questions/comments/needing help send me an email @ zigzagjoe_AT_gmail.com, or you can get on IRC, link in the sig. And as always, any donations are appreciated.
  19. I suspect the port is not being released properly due to some bit of C# <-> wine not working.
  20. If you don't mind, send a copy of your log to zigzagjoe@gmail.com Next update will have plugins for songza.com and last.fm in it. Also, there will likely be a last.fm scrobbling plugin for the client, courtesy of tommy.
  21. Try changing the listen port ("ListenPort" in SProxy.conf)
  22. Good to hear. I have successfully replicated the error here. The error seems to be related to exemptions; this only occurs when the request is exempted and should be going around the proxy but something has gone wrong. If forced to go through the proxy, it works fine. The client also works fine in either case. Ah, yup, it wasn't testing if the request was exempt and so was sending a fully-qualified URL to pandora's server, which it (very sensibly) dropped, if using a http proxy.
  23. I noticed you are set up to use a http proxy in localhost - what is it? This, as far as i can tell, is the weak link. Testing it here with fiddler, it works fine, so I'm guessing whatever proxy that is is causing the problem. Also, when you configure the stand alone client to use the same proxy it has no problem?
  24. I can try updating SProxy's connection handler to the same "spec" that HttpRequest is (httprequest is a diluted form of the proxy handler, but with some improvements), but I don't have much hope of it working. Could you send me a copy of your configuration file to zigzagjoe@gmail.com? You'll probably want to log out of pandora first, and then exit sproxy to commit the changes (removes your password from the config)
  25. Okay. Tire song should not affect it, though. On closer inspection, I see that some album art checks do indeed work, so I'm guessing your connection just tends to be flaky (maybe dropping packets somewhere). --- Current changelog: Client: Added a plugin API Client: Fixed the welcome dialog not dismissing properly Client: Possibly fixed odd httprequest behavior Saver2: Tagging is now handled by taglib - mp4tags is no longer neccisary and will be deleted by the installer Saver2: Added SongInfo.FromMp3 Playlist: Now uses SongInfo.FromMp3 to get tags Grooveshark: Fallback uses SongInfo.FromMp3 to get tags now + some more bugfixes.
×
×
  • Create New...