Sup,
If you have allot of cut files
with thumbnails and can't stand how painfully slow it is browsing through them and have the ability to compile your own XBMC build, you might want to give this a try.
Using this source (any should work):
XBMC_for_Xbox-8.10.src.tar.gzAnd these instructions:
HOW-TO compile XBMC for Xbox from source codeYou can comment out a few lines of code and compile yourself a build that will allow .tbn style thumbnails for .cut files instead of using "<" thumb ">" embedded in the cut.
For this cut named "Some Program.cut":
CODE
E:\Apps\Some Program\default.xbe
E:\Apps\Some Program\Some Program.jpg
E:\Apps\Some Program\CMDSomething.ext
I would remove the thumb tag and its parameter completely. Then copy "Some Program.jpg" to the same directory as the cut file and rename it to "Some Program.tbn". Because a thumb isn't defined in the cut and a thumb file with the same name using the tbn extension exists, it will use the tbn file as the thumb
and cache it.
![biggrin.gif](style_emoticons/default/biggrin.gif)
EG:
E:\Programs\Some Program.tbn
E:\Programs\Some Program.cut
CODE
E:\Apps\Some Program\default.xbe
E:\Apps\Some Program\CMDSomething.ext
As an example, I put 1,000 cuts in a folder using the embedded thumb tag:
:: Takes about 10-20sec before it displays anything in the folder (every time).
:: Scrolling through them is a nightmare. Chug, chug, chug (every time).
:: Takes like 15
min to scroll through them all.
Using the tbn method:
:: Takes 5-10sec before it displays anything in the folder
:: It caches all the thumbs in about 30sec the first time through only, after that they just pop right in.
:: Once cached, scrolling through is silky smooth from then on.
:: Takes like 15
sec to scroll through them all.
Instead of chug, chug, chug - it's normal, faster, even faster - woot!
To do it, you need to modify two files in the source:
..\XBMC_Source_Path\xbmc\FileItem.cpp
..\XBMC_Source_Path\xbmc\GUIWindowPrograms.cpp
In FileItem.cpp (CFileItem::SetUserProgramThumb) around line 2540 change these lines and comment out the lower return:
CODE
if (IsShortCut())
{
CShortcut shortcut;
if ( shortcut.Create( m_strPath ) )
{
// use the shortcut's thumb
if (!shortcut.m_strThumb.IsEmpty())
{ //Ez0n3 <-- add a open curly here
m_strThumbnailImage = shortcut.m_strThumb;
//Ez0n3 - return here if cut has an embedded , quit and use it
return;
} //Ez0n3 <-- add a close curly here
else
{
CFileItem item(shortcut.m_strPath,false);
item.SetUserProgramThumb();
m_strThumbnailImage = item.m_strThumbnailImage;
}
//Ez0n3 - don't return here so that it will find and cache the tbn file
//return;
}
}
In GUIWindowPrograms.cpp (CGUIWindowPrograms::GetDirectory) around line 730 comment out the 3 lines:
CODE
else if (item->IsShortCut())
{ // resolve the shortcut to set it's description etc.
// and save the old shortcut path (so we can reassign it later)
CShortcut cut;
if (cut.Create(item->m_strPath))
{
shortcutPath = item->m_strPath;
item->m_strPath = cut.m_strPath;
//Ez0n3 - xbox specific (missing from win32 source) - prevents tbn file usage for cuts
//if (cut.m_strThumb.IsEmpty()) // try to cache thumb for path
// item->SetUserProgramThumb();
//else
item->SetThumbnailImage(cut.m_strThumb);
LABEL_MASKS labelMasks;
m_guiState->GetSortMethodLabelMasks(labelMasks);
CLabelFormatter formatter("", labelMasks.m_strLabel2File);
if (!cut.m_strLabel.IsEmpty())
{
item->SetLabel(cut.m_strLabel);
__stat64 stat;
if (CFile::Stat(item->m_strPath,&stat) == 0)
item->m_dwSize = stat.st_size;
formatter.FormatLabel2(item.get());
item->SetLabelPreformated(true);
}
}
}
Build and enjoy the massive cut file performance increase!
PS: I would test the build out before replacing the dash, just to be sure. Just run it like you would run any other program.
Let me know if you have any issues, still testing - but loving every second.