PDA

View Full Version : Thumbnail creation / ImageLib - bug fix to come hopefully


herg
2007-08-24, 20:21
I'm trying to track down a couple of bugs related to the creation of thumbnails, and I've run into a barrier. Everything looks good until functions that I believe are in the ImageLib are called. The problem is that I don't know what code is used to create ImageLib since it's stored in svn as a binary.

herg
2007-08-24, 21:17
Ok, I found the first one. Video thumbnails were messed up. It wasn't in the ImageLib, but rather was caused by directories that weren't getting created. Here's a patch:

https://sourceforge.net/tracker/index.php?func=detail&aid=1781311&group_id=87054&atid=581840

The other is a problem with permissions on music thumbnails that are created by recursive library scans. If I fix the permissions manually, they show up as expected. I haven't found where the file is created (and incorrect permisssions set) yet.

jmarshall
2007-08-25, 01:32
ImageLib sources are in sources/ folder in branch (and/or trunk). Ideally patches for that should go directly into trunk :)

Thanks for the video thumb fix - will apply.

Cheers,
Jonathan

herg
2007-08-25, 04:47
Thanks Jonathan. I dug around and found the sources folder a little earlier, and after much stumbling, I figured ImageLib is not at fault here either.

In xbmc/linux/XFileUtils.cpp, CopyFile(), the open of the destination file is creating a file with weird permissions. If I use the stat() from the source file to set dest permission during open(), it looks better, but I still can't set owner read. Best I can tell, the thread umask is goofed up, but I haven't been able to track down the thread creation yet.

sho
2007-08-25, 14:24
Out of curiosiosity, what are these bugs?

herg
2007-08-26, 15:37
First one, now fixed, was that video thumbnails did not show up.

Second one is that music folder thumbnails only show up if scan is started from that particular folder. Recursive scans result in thumbnails being created in UserData/Thumbnails/Music/*/, but they do not have read permissions. In XBMC, they show as nothing, not even the default folder icon.

I plan to work on it more later, but I'm out of town this weekend.

vulkanr
2007-08-27, 00:03
commited a fix (hopefully). thanks herg.

herg
2007-08-27, 23:18
vulkanr,

Works for me. I think you squashed it.