REST API is buggy

Post your Server Bug Report
User avatar
DoCC
Contributor
Contributor
Posts: 211
Joined: 25 Feb 2014, 14:41
Has thanked: 40 times
Been thanked: 65 times

REST API is buggy

Unread post by DoCC »

Hi Mad,

i have encountered a bug in the api : )

All tracks with a duration of 0 - 59:59 min:sec are listed quite fine.
If you are listening to an big mix with duration > 60 min the api does not deliver correct information.
In Madsonic itself , the track is gone on the right side.
The api query knows that you are listening, but has dropped any information.

This is a query taken with all info given like it should - right after start

Code: Select all

SimpleXMLElement Object ( [@attributes] => Array ( [status] => ok [type] => madsonic [version] => 1.12.0 ) [nowPlaying] => SimpleXMLElement Object ( [entry] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 28047 [parent] => 28048 [title] => Deep - Abba-Mania [album] => Deep - Abba-Mania [artist] => Deep - Abba Mania [isDir] => false [coverArt] => 28048 [created] => 2012-05-17T20:08:04 [duration] => 4072 [bitRate] => 192 [size] => 97795287 [rank] => 0 [suffix] => mp3 [contentType] => audio/mpeg [isVideo] => false [path] => DEEP DANCE/Artist Mixes and the Bloody Rest/Deep - Abba Mania/Deep - Abba-Mania/Deep - Abba-Mania.mp3 [albumId] => 2182 [artistId] => 1862 [type] => music [transcodedSuffix] => mp3 [transcodedContentType] => audio/mpeg [username] => DoCC [playerId] => 1 [minutesAgo] => 0 ) ) ) ) 
query taken after 59 min playing time. all ok

Code: Select all

SimpleXMLElement Object ( [@attributes] => Array ( [status] => ok [type] => madsonic [version] => 1.12.0 ) [nowPlaying] => SimpleXMLElement Object ( [entry] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 28047 [parent] => 28048 [title] => Deep - Abba-Mania [album] => Deep - Abba-Mania [artist] => Deep - Abba Mania [isDir] => false [coverArt] => 28048 [created] => 2012-05-17T20:08:04 [duration] => 4072 [bitRate] => 192 [size] => 97795287 [rank] => 0 [suffix] => mp3 [contentType] => audio/mpeg [isVideo] => false [path] => DEEP DANCE/Artist Mixes and the Bloody Rest/Deep - Abba Mania/Deep - Abba-Mania/Deep - Abba-Mania.mp3 [albumId] => 2182 [artistId] => 1862 [type] => music [transcodedSuffix] => mp3 [transcodedContentType] => audio/mpeg [username] => DoCC [playerId] => 1 [minutesAgo] => 59 ) ) ) ) 
query AFTER 3600 secs playing time . broken

Code: Select all

SimpleXMLElement Object ( [@attributes] => Array ( [status] => ok [type] => madsonic [version] => 1.12.0 ) [nowPlaying] => SimpleXMLElement Object ( [0] => ) ) 
resulting in
api brocken.PNG
this changes in a valid xml if a new track is started
These users thanked the author DoCC for the post:
Madsonic
Rating: 7.69%
User avatar
DoCC
Contributor
Contributor
Posts: 211
Joined: 25 Feb 2014, 14:41
Has thanked: 40 times
Been thanked: 65 times

Re: REST API is buggy

Unread post by DoCC »

there is one more. ...

i have tested playing such a long file with my acc and login with my test user ...
both xmls were ok .

but if one track exceeds the 3600 secs then the entire xml gets broken. so this is not xml-shit per user this is entire server .
even if my test acc owuld have played normal files, there would have been the above mentioned bug.

EDIT ::
and another one.

This

Code: Select all

"SimpleXMLElement Object ( [@attributes] => Array ( [status] => ok [type] => madsonic [version] => 1.12.0 ) [nowPlaying] => SimpleXMLElement Object ( [0] => ) )"
is the output on playingtime > 3600 sec AND server online not playing anyone ...

So it is not possible to determine if, there is a bug in the output, or if just nothing happens.

a little help would be to add a parameter in the REST API within getUser >> http://beta.madsonic.org/api.jsp#getUser to get is_loggedin 1 or 0 ?

Just to mention ... i do not have any clue whats behind all these jsp and war files XD , so if this is not possible , ok ^^
User avatar
DoCC
Contributor
Contributor
Posts: 211
Joined: 25 Feb 2014, 14:41
Has thanked: 40 times
Been thanked: 65 times

Re: REST API is buggy

Unread post by DoCC »

Ah Mad,
another "bug" :twisted:

same XML error occurs on the entire server if one user pauses a track for over 3600 sec ...
Post Reply