jkovacs / lastfm-java Goto Github PK
View Code? Open in Web Editor NEWJava bindings for the Last.fm Web Services
License: BSD 2-Clause "Simplified" License
Java bindings for the Last.fm Web Services
License: BSD 2-Clause "Simplified" License
Track.search throws an exception when calling it.
For example a call of Track.search("Lacuna coil", key);
DEC 28, 2017 5:05:49 PM de.umass.lastfm.Caller openConnection
INFO: Open connection: http://ws.audioscrobbler.com/2.0/
DEC 28, 2017 5:05:49 PM de.umass.lastfm.Caller openPostConnection
INFO: Post body: method=track.search&limit=30&track=Lacuna+coil&api_key=API_KEY
Exception in thread "main" java.lang.NumberFormatException: For input string: "FIXME"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at de.umass.lastfm.MusicEntry.loadStandardInfo(MusicEntry.java:207)
at de.umass.lastfm.Track$TrackFactory.createItemFromElement(Track.java:697)
at de.umass.lastfm.Track$TrackFactory.createItemFromElement(Track.java:694)
at de.umass.lastfm.ResponseBuilder.buildCollection(ResponseBuilder.java:70)
at de.umass.lastfm.ResponseBuilder.buildCollection(ResponseBuilder.java:61)
at de.umass.lastfm.Track.search(Track.java:216)
at de.umass.lastfm.Track.search(Track.java:191)
at nz.mega.bindingsample.Test.main(Test.java:31)
de.umass.lastfm.CallException: java.io.IOException: closed
is thrown at this line, Caller.createResultFromInputStream() method:
Document document = this.newDocumentBuilder().parse(new InputSource(new InputStreamReader(inputStream, "UTF-8")));
I know this repo is not maintained, but perhaps someone has encountered this and knows why this is happening? Help would be appreciated.
For whatever reason, I'm unable to make any requests on Android. Logcat only shows that the request is being opened, but nothing else.
Upon importing the source into Android studio, I can trace it back as far as into the openPostConnection method. The part where the urlConnection's OutputStream is passed into the outputStream variable is never called, and stops after "urlConnection.setDoOutput(true);". However, if I set a System.out after urlConnection.setDoOutput(true), this is called. It just breaks off entirely after that, no exceptions seem to be thrown, and any of my code after my initial "User.getWeeklyAlbumChart" is not executed, completely broken off. I am unsure what is happening.
I came across this Stackoverflow question: http://stackoverflow.com/questions/8438415/last-fm-api-call-from-android-application
And tried setting cache to null as the answer suggested, but this had no effect on anything.
My code is simplistic enough code that doesn't require authentication of the user, just getting their top tracks for the week (Android port of my lastfm-collage-generator repository). Internet permission is declared in the manifest and my device is online.
Any idea as to what on earth could be going on? Any possible solutions?
Thanks
After calling
session = Authenticator.getMobileSession( username, password, key, secret );
Is there a way to check whether that session is valid, and if not, why it failed (i.e. bad username / password, no internet connection, etc.)
Thank you!
Would it be possible for you to make a release with the HTTPS patches? latest in mvn (0.1.2) still isn't HTTPS safe.
I've been using this library to query for events from a list of ~500 popular artists and I get no results. My code worked fine up untill a couple months ago. Wondering if anything changed?
When attempting to use the search function, it seems like it tries to parse "FIXME" as an Integer.
Exception in thread "main" java.lang.NumberFormatException: For input string: "FIXME"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
at java.base/java.lang.Integer.parseInt(Integer.java:652)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at de.umass.lastfm.MusicEntry.loadStandardInfo(MusicEntry.java:207)
at de.umass.lastfm.Track$TrackFactory.createItemFromElement(Track.java:697)
at de.umass.lastfm.Track$TrackFactory.createItemFromElement(Track.java:694)
at de.umass.lastfm.ResponseBuilder.buildCollection(ResponseBuilder.java:70)
at de.umass.lastfm.ResponseBuilder.buildCollection(ResponseBuilder.java:61)
at de.umass.lastfm.Track.search(Track.java:216)
Artist.getInfo
currently supports an optional Locale
parameter to request a response in a particular language; Album.getInfo
should support this as well.
It's always null.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.