kinyerakenneth / lastfm-java

Automatically exported from code.google.com/p/lastfm-java
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Error "Plugin bug: Not all request variables are set - Invalid Timestamp" on scrobbling - need to format startTime down to 10 digits #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create scrobbler
2. do handshake
3. submit a song

What is the expected output? What do you see instead?
expected - Service replies OK and song goes to stats
experiencing - server responses "Plugin bug: Not all request variables are set 
- Invalid Timestamp" 

What version of the product are you using? On what operating system?
v1.7.3,
reproduced against Windows7 and WinXP

Please provide any additional information below.

cause - System.currentTimeMillis() returns long value of 13 digits length. 
that's wrong. Oficcial client sends timestamp of 10 digits
solution - format startTime to 10-digits-timestamp before creating submission 
URL within SubmissionData#toString

Original issue reported on code.google.com by nedu...@gmail.com on 19 Oct 2010 at 7:28

GoogleCodeExporter commented 9 years ago
Last.fm requires a UNIX timestamp in [s], getTimeMillis() returns [ms] so 
divide it by 1000 if you want to use that value, not a bug in the API.

Original comment by jannikov...@gmail.com on 20 Oct 2010 at 8:17