finnyb / javampd

Java API for controlling the Music Player Daemon (MPD)
GNU General Public License v2.0
37 stars 21 forks source link

Player refresh interval not changeable #53

Closed Scrumplex closed 7 years ago

Scrumplex commented 8 years ago

Hello there, I just started using this library and noticed that the Player class refreshes every 5 second, and that interval is not changeable.

finnyb commented 8 years ago

Are you referring to the stand alone monitor thread? It appears this is set to check every second. I agree this needs to be made configurable though. I'll get a fix in shortly.

Scrumplex commented 8 years ago

As far as I looked through the code, the Player class gets statuses like totaltime and elapsedtime from the Server class. If I do mpd.getServer().setRefreshInterval(0); it still refreshes every 5 seconds.

finnyb commented 8 years ago

out of curiosity have you tried setting the interval to 1 instead of 0? The 0 second interval might be throwing the calculation off

Scrumplex commented 8 years ago

Yes I also tried that

rugarci commented 7 years ago

After this change I get this exception:

017-09-10 12:13:28 INFO MPDProperties:48 - Override properties file not on classpath java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:434) at java.util.Properties.load0(Properties.java:353) at java.util.Properties.load(Properties.java:341) at org.bff.javampd.server.MPDProperties.loadProperties(MPDProperties.java:53) at org.bff.javampd.server.MPDProperties.loadOverrideValues(MPDProperties.java:46)

Maybe load properties should throw not only IOException