Fiasco
Senior Member Posts: 159 Joined: May 2009 Reputation: 0 |
2009-09-22 22:57
Post: #1
Would it be possible to get a javascript function for AJAX purposes that can take the path/filename and convert it to the correct thumbnail (tbn) filename?
|
| find quote |
Fiasco
Senior Member Posts: 159 Joined: May 2009 Reputation: 0 |
2009-09-22 23:14
Post: #2
Or, add the crc of the thumb to the database?
|
| find quote |
Fiasco
Senior Member Posts: 159 Joined: May 2009 Reputation: 0 |
2009-09-23 18:12
Post: #3
this what is listed on the thumbnail wiki page for generating the thumb crc/name.
Code: public string Hash(string input)Here is my (failed) javascript Code: function findCRC( string ) {C:\Movies\Singles.iso generates -43a5d0a9 (should generate 405f3ec2) C:\Movies\Wag The Dog.iso generates -1e3e89c7 (should generate 30d882a2) Help!
(This post was last modified: 2009-09-23 18:24 by Fiasco.)
|
| find quote |
Fiasco
Senior Member Posts: 159 Joined: May 2009 Reputation: 0 |
2009-09-23 20:34
Post: #4
OK I've gotten closer!!! It returns some values correctly! Some are not.
Any suggestions I'll gratefully accept!! FindCRC( "C:\Movies\Wag The Dog.iso" ); returns 30d882a2 (CORRECT!) FindCRC( "C:\Movies\The Wedding Singer.iso"); returns 4bbcf3ea (CORRECT!) FindCRC("C:\Movies\Singles.iso"); returns 405f3ec2 (CORRECT!) FindCRC("C:\Movies\The Adventures of Ford Fairlane.iso"); returns -a2a374c (WRONG!) FindCRC("C:\Movies\Identity.iso"); returns -6ed4f2f4 (WRONG!); Code: Number.prototype.unsign = function(bytes) { |
| find quote |
Fiasco
Senior Member Posts: 159 Joined: May 2009 Reputation: 0 |
2009-09-23 21:09
Post: #5
sooo close argghhhhh
|
| find quote |
Fiasco
Senior Member Posts: 159 Joined: May 2009 Reputation: 0 |
2009-09-23 21:43
Post: #6
HOOORAY!!!!!
How to convert the path + filename to the CRC code for thumbnails in javascript. Call from j var thumbcrc = FindCRC( "C:\Movie\Adventures Of Ford Fairlane.iso"); Code: Number.prototype.unsign = function(bytes) { |
| find quote |
kevbrown
Junior Member Posts: 3 Joined: Nov 2009 Reputation: 0 |
2009-11-19 06:39
Post: #7
I'm wanting to do the same thing in PHP. I want to do some tinkering with a web based library editor, but I can't for the life of me figure this out. There's a crc32 function within PHP, but that doesn't return the right value, so I wrap dechex to convert to hex, still no dice. Based on what I "think" your function is doing, I'm then performing this on the lower case string.
Also - what path does it use, the full path to the file, just the file name? How does it work with stacked items? Have you tried that? |
| find quote |
Fiasco
Senior Member Posts: 159 Joined: May 2009 Reputation: 0 |
2009-11-19 07:02
Post: #8
full path to the filename as in the example
|
| find quote |
tjpoe
Junior Member Posts: 48 Joined: Nov 2009 Reputation: 0 |
2009-12-18 20:45
Post: #9
did you ever figure this out in PHP? i'm trying to do the same thing.
tried : crc32 ( $path . $file ). also tried dechex( crc32( $path . $file ) ) but both were a no go. |
| find quote |
forumReader
Junior Member Posts: 3 Joined: Mar 2010 Reputation: 0 |
2010-03-21 02:40
Post: #10
Fiasco Wrote:HOOORAY!!!!! Hi, very great job done. ![]() but when i try the exambles on xbmc:wiki- Thumbnails, some get the wrong hash. I tried some from my own and 2 did not work. 123456789 returns 376e6e7 should return: 0376e6e7 F:\Videos\Nosferatu.avi returns 2a6ec78d -> correct smb://user:pass@server/share/directory/ returns c5559f13 -> correct smb://user:pass@server/share/directory/file.ext retutns 8ce36055 -> correct im trying to fix it but its very hard.. on smb:// devices it works fine: smb://data:data@michi_lap/e/musik/paul kalkbrenner - berlin calling bonus/01 aaron.mp3 should return: 20ae3cc1 but on local device: e:\musik\paul kalkbrenner - berlin calling bonus\01 aaron.mp3 it returns: c8caa9e4 but should return: 614b6c10 some other examble: e:\\musik\\clueso - gute musik\\clueso - gute musik - 15 - vergessen ist so leicht - maskulin.mp3 returns: c17f5fd6 should return: e09ff0ca ore did id did something wrong?
(This post was last modified: 2010-03-21 03:12 by forumReader.)
|
| find quote |


Search
Help