lib/grooveshark/request.rb in grooveshark-0.2.6 vs lib/grooveshark/request.rb in grooveshark-0.2.7

- old
+ new

@@ -20,15 +20,11 @@ 'parameters' => params } body['header']['token'] = create_token(method) if @comm_token begin - data = RestClient.post(url, body.to_json, { - 'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.77 Safari/537.1', - 'Content-Type' => 'application/json', - 'Referer' => get_method_referer(method) - }) + data = RestClient.post(url, body.to_json, {'Content-Type' => 'application/json'}) rescue Exception => ex raise GeneralError, ex.message end data = JSON.parse(data) @@ -59,13 +55,9 @@ ] jsqueue_methods.include?(method) ? 'jsqueue' : 'htmlshark' end def get_method_client_revision(method) - get_method_client(method) == 'jsqueue' ? '20120227' : '20120227.01' - end - - def get_method_referer(method) - "http://grooveshark.com/JSQueue.swf?20120521.02" if get_method_client(method) == 'jsqueue' + get_method_client(method) == 'jsqueue' ? '20120312.02' : '20120312' end end end