Wrong JSON encoding of track title 'null'

Post your Server Bug Report
sanderd
Posts: 2
Joined: 15 Oct 2014, 15:27
Has thanked: 0
Been thanked: 1 time

Wrong JSON encoding of track title 'null'

Unread post by sanderd »

Hi,

I was just trying to listen to 'The Algorithm' - 'Null' (of his Polymorphic Code album), through jamstash.
After trying to diagnose the problem, it appears that the track title is serialized as null instead of "Null" in the API. After updating to the latest 5.2 beta (was on 5.1), the problem remains.

Code: Select all

https://***/music/rest/getMusicDirectory.view?u=someuser&p=enc:123456789&f=jsonp&v=1.6.0&c=Jamstash&id=15518&callback=jQuery20306720871145371348_1418720665372&_=1418720665379

jQuery20306720871145371348_1418720665372({"subsonic-response": {
 "status": "ok",
 "directory": {
  "child": [
   {
    // ...
   },
   {
    // ...
   },
   {
    // ...
   },
   {
    // ...
   },
   {
    // ...
   },
   {
    // ...
   },
   {
    "genre": "Djent",
    "albumId": 1270,
    "album": "Polymorphic Code",
    "track": 7,
    "parent": 15518,
    "contentType": "audio/mpeg",
    "isDir": false,
    "type": "music",
    "suffix": "mp3",
    "discNumber": 1,
    "isVideo": false,
    "size": 10073773,
    "id": 15533,
    "rank": 8,
    "title": null, // <-------
    "duration": 266,
    "artistId": 480,
    "created": "2014-06-04T22:19:49",
    "path": "The Algorithm/Polymorphic Code/The Algorithm - Null.mp3",
    "year": 2012,
    "artist": "The Algorithm",
    "bitRate": 255,
    "coverArt": 15518
   },
   {
    "genre": "Djent",
    "albumId": 1270,
    "album": "Polymorphic Code",
    "track": 8,
    "parent": 15518,
    "contentType": "audio/mpeg",
    "isDir": false,
    "type": "music",
    "suffix": "mp3",
    "discNumber": 1,
    "isVideo": false,
    "size": 23684436,
    "id": 15534,
    "rank": 0,
    "title": "Panic",
    "duration": 737,
    "artistId": 480,
    "created": "2014-06-04T22:19:49",
    "path": "The Algorithm/Polymorphic Code/The Algorithm - Panic.mp3",
    "year": 2012,
    "artist": "The Algorithm",
    "bitRate": 240,
    "coverArt": 15518
   }
  ],
  "id": 15518,
  "name": "Polymorphic Code",
  "parent": 31
 },
 "xmlns": "http://madsonic.org/restapi",
 "type": "madsonic",
 "version": "1.12.0"
}});
Funny how a song called 'null' mentioning 'NullPointerException' is resulting in a NullReferenceException in Jamstash.

Reporting the issue here, because the problem seems to reside on the API-level.
These users thanked the author sanderd for the post:
DoCC
Rating: 7.69%
Post Reply