2012-08-12, 09:19
(2012-08-11, 19:47)Tolriq Wrote: I finally got the database and it seems that's it the data in database that is not good and I suppose the json part suppose the data is correct UTF and does not do another utf encodeIn general XBMC should store everything as UTF8. If it doesn't the problem is somewhere else in XBMC and could also cause problems in the GUI when displaying the text.
How is non valid UTF be stored in database ? If this can happens shouldn't the Json part ensure that it sends correct data ?
A screen shot of the database content : http://yatse.leetzone.org/Images/utf.png
Another possibility is if a user manually changed stuff in the database (e.g. fixed a movie plot or something like that). Then it's no longer garantueed that the text is correctly encoded in UTF8 but that's the problem of the user manually editing the database or using a third party tool that writes directly to the XBMC database and messes up the encoding.
(2012-08-11, 20:44)Tolriq Wrote: And another question that have nothing to do with thatI haven't considered pictures yet tbh. Will have to think on it and discuss with jmarshall.
What is the recommended way to get pictures thumbs for Frodo ?
It seems there's no way for Eden other than getting the real image via preparedownload and vfs.
But for Frodo if VFS is removed ?
Should I make a FR so that the thumbnail properties is filled in GetDirectory for media = pictures ?
(2012-08-12, 01:25)Tolriq Wrote: And to finish for today, another very small bug that might worth being corrected for Frodo.Hm good question whether it should show "directory" and the path to the directory or "file" and the path to the file. The former would be normal behaviour in video files view while the latter would be the behaviour with "Stacking" enabled in video files view.
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 ).
(2012-08-12, 04:06)jmarshall Wrote: Why is removing an item from a database more dangerous than allowing access to download a file? The file itself is not deleted.
Access to any file on your computer is faaaaar more dangerous than deleting something in the database. With the VFS handler you can access any file on your computer so also the password files on linux etc. IMO it's more important to fix such a security issue even if it means restricting access to other "valid" files for now until a better solution has been found (which is not so easy).