Thumbnails
#16
This wildcard idea is something I've wanted for a little while as well. For folders containing archived series, a static 'folder.jpg' or similar is fine; I can set it up once and forget about it. But there's another use case:

The situation I'm thinking of is a folder containing current episodes (of, say, Consolevania, Nerd TV, various Revision3 productions). I'll download a new episode to that folder, watch it some time later through XBMC, then delete it. With such turnover, it's an inconvenience to create properly-named thumbnails for each episode. I might have "Consolevania 101.avi", "Consolevania 102.avi" etc, and would love to have (say) "Consolevania~.tbn" to match them all. If I deleted those video files and added "Consolevania 103.avi", I wouldn't have to touch the thumbnails at all.

I've suggested the tilde ( ~ ) as a wildcard character as it's a valid, but probably little-used, character. The carat ( ^ ) might be even better.

Another twist to this idea that I'd quite like to see is the use of a thumbnails sub-folder (either automagically with a special name, or nominated in sources.xml). Then in my "now playing" folder I'd have the (invisible) sub-folder ".thumbnails" (say), containing "Consolevania~.tbn" etc. The reason for this suggestion is that I manage the contents of this folder through my PC (I've made the share read-only for now to prevent accidental deletion!) and it would simplify such management. This idea is supplementary; the wildcard idea is the strongest one for my usage.

I see that there's a Windows-based development environment available so I'd like to take a look at implementing this, but I don't know yet when I'll have the time so I won't promise anything!
Reply
#17
yeyh for serious browsing delays.
Reply
#18
That would have been my concern, so I was wondering about how much information is normally cached, and for how long. If I visit a folder in XBMC, then leave it and return, are the thumbnails cached for the second visit? Could they be, based on folder modification times?
Reply
#19
And thinking about it some more, if the list of thumbnails containing wildcards could be constructed once and held in memory while that folder is being viewed, then the impact on any given folder without wildcard thumbnails would be minimised. It's only when wildcard thumbnails exist that the patterns would be matched against, and only then for files which don't have exact thumbnail matches.

For the use case I envisage, this would be limited to just one folder; browsing the rest of my sources would be just as usual. More: the idea of a thumbnails sub-folder could be changed a little -- wildcard thumbnails would only be allowed inside the (say) "wildcards.tbn" sub-folder. Folders without this sub-folder would therefore be unaffected.

And if speed really does become a problem, how about another sub-folder inside "wildcards.tbn" for a cache? Once a wildcard thumbnail has been matched to a video file, it can be copied to the cache directory under an appropriate name for speedier future access.

Determination of thumbnails (example: "Consolevania 101.avi") would therefore be:
1. Look in the same directory for "Consolevania 101.tbn". If it's there, we're finished.
2. Look for "wildcards.tbn"; if it's not there, we're finished (with no thumbnail).
3. Look for "wildcards.tbn/cache/Consolevania 101.tbn". If it's there, we're finished.
4. Try to match a thumbnail from "wildcards.tbn". If we find one (say "Consolevania~.tbn"), we save it to "wildcards.tbn/cache/Consolevania 101.tbn", and use it as our thumbnail. We're finished.

So the performance hit can be minimised, and made to only affect individual nominated folders. Transforming wildcard-containing thumbnail names into simple regular expressions and sorting them can hopefully be done once when scanning the folder (I say "hopefully" because I don't know the architecture!).
Reply
#20
Feel free to code it up then.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#21
Indeed, I intend to. I have the Windows build (thanks for making that!) and the SDK, so I've just got to work out how to build it myself. And then remember how to use C. Smile
Reply
#22
Ok, so it doesn't look like my wildcard idea is going to happen... I still think it's a good idea btw though. It would be sooo much easier to have one _.tbn file in a folder applied to all the tv shows in that folder than to have to copy and paste a .tbn for each episode and then rename it to match. Such a pain.

Anyway, since this doesn't seem to be of interest, I was wondering if anyone knew of a program that would do the work for me- ie. take my one thumbnail for a tv show and copy and rename it to match each episode file, like a batch program. I've googled and googled, but turned up nothing.
Reply
#23
Rudepooch Wrote:Anyway, since this doesn't seem to be of interest, I was wondering if anyone knew of a program that would do the work for me- ie. take my one thumbnail for a tv show and copy and rename it to match each episode file, like a batch program. I've googled and googled, but turned up nothing.

Total commander (http://www.ghisler.com) has a multi-rename tool, you could create plenty of copies of you file (cut and paste) and use the multi-rename tool to have them match the names you want.

And this program is a great file manager, kicks windows explorer's butt!
Hardware: Revo 3610 + SSD - Harmony 700 Remote
Software: XBMCBuntu Gotham - Sickbeard - SabNZBd+

Image
Reply
#24
The_Dogg Wrote:Total commander (http://www.ghisler.com) has a multi-rename tool, you could create plenty of copies of you file (cut and paste) and use the multi-rename tool to have them match the names you want.

And this program is a great file manager, kicks windows explorer's butt!

Forgot to say that the shorcut for multi-rename is: CTRL+M (with you files being selected)
Hardware: Revo 3610 + SSD - Harmony 700 Remote
Software: XBMCBuntu Gotham - Sickbeard - SabNZBd+

Image
Reply
#25
for i in *.avi; do cp thumbnail.jpg `echo $i | awk -F '.avi' '{print $1}'`.tbn; done

if you have a proper shell
Reply
#26
Rudepooch Wrote:Ok, so it doesn't look like my wildcard idea is going to happen... I still think it's a good idea btw though. It would be sooo much easier to have one _.tbn file in a folder applied to all the tv shows in that folder than to have to copy and paste a .tbn for each episode and then rename it to match. Such a pain.

If you can make your own build of XBMC, you can apply the patch referenced here:

http://forum.xbmc.org/showthread.php?tid=25027

...then create a folder 'wildcards.tbn' inside your TV shows folder, and '~.tbn' (that's a tilde, which on my UK keyboard is above the # character) inside that. That thumbnail will match all files in your TV shows folder.

The 'wildcards.tbn' folder will be visible however; I didn't get around to working out how to hide that.
Reply

Logout Mark Read Team Forum Stats Members Help
Thumbnails0