How does XBMC calculate the CRC for .cut files?

Requests, suggestions, support, and everything else python / plugin related.
Post Reply
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 257 times

How does XBMC calculate the CRC for .cut files?

Post by Rocky5 »

Im trying to workout the path used to calculate the CRC but no matter what I type in or set it as it never gets the value XBMC does when it caches the thumbnail.

I'm wanting to make a script that will do all the thumbnail generating instead of waiting for XBMC to do it on entering a window.

Code: Select all

if os.path.isdir( CUTFile_Path ):
	if CountList == 1:	pDialog.create( "Generating Thumbnails" )
	for Folders in sorted( os.listdir( Emulator_Path ) ):
		EmuFolder = os.path.join( CUTFile_Path, Folders ) + "\\"
		if os.path.isdir( EmuFolder ):
			for CUT_Files in sorted( glob.glob( EmuFolder + "*.cut" ) ):
				TBN_Files = CUT_Files[:-3] + "tbn"
				ThumbCache = xbmc.getCacheThumbName( CUT_Files )
				dialog.ok(CUT_Files,EmuFolder,ThumbCache[0] + "\\" + ThumbCache )
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
skatulskijean
Posts: 1028
Joined: Wed Jul 04, 2012 8:01 am
Has thanked: 1 time
Been thanked: 148 times

Re: How does XBMC calculate the CRC for .cut files?

Post by skatulskijean »

I hope this can help https://forum.kodi.tv/showthread.php?tid=136877
Regards Jan
User avatar
Rocky5
Posts: 974
Joined: Sat Feb 08, 2014 5:27 am
Has thanked: 101 times
Been thanked: 257 times

Re: How does XBMC calculate the CRC for .cut files?

Post by Rocky5 »

skatulskijean wrote: Wed Aug 02, 2017 7:17 pm I hope this can help https://forum.kodi.tv/showthread.php?tid=136877
Regards Jan
Cheers but that doesn't help.

I know how to get the crc its just for some reason cut files dont seem to work :/ xbe files work fine.


Got it, if the files are inide the XBMC root directory it used the damn special protocol :evil:
special://xbmc/_cuts/genesis/3 ninjas kick back.cut
here is the working code

Code: Select all

if os.path.isdir( CUTFile_Path ):
	if CountList == 1:	pDialog.create( "Generating Thumbnails" )
	for Folders in sorted( os.listdir( Emulator_Path ) ):
		EmuFolder = os.path.join( CUTFile_Path, Folders ) + "\\"
		if os.path.isdir( EmuFolder ):
			for CUT_Files in sorted( glob.glob( EmuFolder + "*.cut" ) ):
				if CUTFile_Path.startswith(Root_Directory):
					CUT_Files = CUT_Files.replace( Root_Directory,"special://xbmc/" )
					CUT_Files = CUT_Files.replace( "\\","/" ).lower()
				TBN_Files = CUT_Files[:-3] + "tbn"
				ThumbCache = xbmc.getCacheThumbName( CUT_Files )
				pDialog.update( ( CountList * 100 ) / len( TBN_Files ),"Scanning Games",TBN_Files,ThumbCache )
				if os.path.isfile( TBN_Files ):
					shutil.copy2( TBN_Files, Temp_Profile_Directory + ThumbCache[0] + "\\" + ThumbCache )
				CountList = CountList + 1
				
if os.path.isdir( ThumbDirectory ): shutil.rmtree( ThumbDirectory )
os.rename( Temp_Profile_Directory[:-1], Temp_Profile_Directory[:-5] + "Programs" )
pDialog.close()
dialog.ok( "Thumbnail Cleaner","","Process Complete" )
Download Xbox Softmodding Tool & Extras Disc
XBMC4Kids Mod


Xbox Gamertag = Connxtion
PSN ID = JCRocky5
Post Reply