2012-08-12, 01:25
And to finish for today, another very small bug that might worth being corrected for Frodo.
When doing a Files.GetDirectory with media set to movie on a directory with movies scanned to Xbmc databases with an organization of 1 movie by folder, the response list the directories as recognized movies with a correct type of movie and set the filename directly to the movie but leaves the FileType attribute to directory instead of file.
For example :
Gives the result :
As you see file attributes are set to a file in subdirs since movie is in database so referring to a direct file but the result also contain : "filetype":"directory" witch should mean that you can go down a level in the returned file attribute witch is obviously not possible.
The correct behavior should to have the filetype set to file. (Or to send back only the directory so we could go in but I don't think this would make sense for full real browsing we should use the media:files ).
When doing a Files.GetDirectory with media set to movie on a directory with movies scanned to Xbmc databases with an organization of 1 movie by folder, the response list the directories as recognized movies with a correct type of movie and set the filename directly to the movie but leaves the FileType attribute to directory instead of file.
For example :
Code:
{"id":1,"jsonrpc":"2.0","method":"Files.GetDirectory","params":{"media":"video","directory":"Z:\\Films\\","properties":["title","thumbnail","fanart","rating","genre","artist","track","season","episode","year","duration","album","showtitle","playcount"]}}
Gives the result :
Code:
{"id":1,"jsonrpc":"2.0","result":{"files":[{"album":"","artist":"","episode":-1,"fanart":"image://Z%3a%5cFilms%5c13%20fant%c3%b4mes%20(Thir13en%20Ghosts)%20%5b720p%5d%20%5b2002%5d%5cfanart.jpg","file":"Z:\\Films\\13 fantômes (Thir13en Ghosts) [720p] [2002]\\13 fantômes.bluray.720p.2002.mkv","filetype":"directory","genre":"","id":7,"label":"13 fantômes","playcount":1,"rating":5.0999999046325684,"season":-1,"showtitle":"","thumbnail":"image://Z%3a%5cFilms%5c13%20fant%c3%b4mes%20(Thir13en%20Ghosts)%20%5b720p%5d%20%5b2002%5d%5cmovie.tbn","title":"13 fantômes","track":-1,"type":"movie","year":2002},{"album":"","artist":"","episode":-1,"fanart":"image://Z%3a%5cFilms%5c13%20jeux%20de%20mort%20(13%20game%20Sayawng)%20%5b720p%5d%20%5b2006%5d%5cfanart.jpg","file":"Z:\\Films\\13 jeux de mort (13 game Sayawng) [720p] [2006]\\13 jeux de mort.720p.2006.mkv","filetype":"directory","genre":"Thriller","id":8,"label":"13 jeux de mort","playcount":0,"rating":5,"season":-1,"showtitle":"","thumbnail":"image://Z%3a%5cFilms%5c13%20jeux%20de%20mort%20(13%20game%20Sayawng)%20%5b720p%5d%20%5b2006%5d%5cmovie.tbn","title":"13 jeux de mort","track":-1,"type":"movie","year":2006},{"album":"","artist":"","episode":-1,"fanart":"image://Z%3a%5cFilms%5c2%20Fast%202%20Furious%20(2%20Fast%202%20Furious)%20%5b720p%5d%20%5b2003%5d%5cfanart.jpg","file":"Z:\\Films\\2 Fast 2 Furious (2 Fast 2 Furious) [720p] [2003]\\2 Fast 2 Furious.hddvd.720p.2003.mkv","filetype":"directory","genre":"Action / Crime / Thriller","id":4,"label":"2 Fast 2 Furious","playcount":1,"rating":5.0999999046325684,"season":-1,"showtitle":"","thumbnail":"image://Z%3a%5cFilms%5c2%20Fast%202%20Furious%20(2%20Fast%202%20Furious)%20%5b720p%5d%20%5b2003%5d%5cmovie.tbn","title":"2 Fast 2 Furious","track":-1,"type":"movie","year":2003},{"album":"","artist":"","episode":-1,"fanart":"image://Z%3a%5cFilms%5c2012%20(2012)%20%5b720p%5d%20%5b2009%5d%5cfanart.jpg","file":"Z:\\Films\\2012 (2012) [720p] [2009]\\2012.720p.2009.mkv","filetype":"directory","genre":"","id":20,"label":"2012","playcount":0,"rating":6,"season":-1,"showtitle":"","thumbnail":"image://Z%3a%5cFilms%5c2012%20(2012)%20%5b720p%5d%20%5b2009%5d%5cmovie.tbn","title":"2012","track":-1,"type":"movie","year":2009}
As you see file attributes are set to a file in subdirs since movie is in database so referring to a direct file but the result also contain : "filetype":"directory" witch should mean that you can go down a level in the returned file attribute witch is obviously not possible.
The correct behavior should to have the filetype set to file. (Or to send back only the directory so we could go in but I don't think this would make sense for full real browsing we should use the media:files ).