Monday, May 23, 2011

Frequently Asked Questions

What is a moviesheet?
  • A moviesheet is a JPG image generated by inserting screenshots and movie data into a template, to be displayed before opening a movie file.
 
Why would you want to use a moviesheet?
  • So in my case, instead of using disc based media (DVD's, etc) I keep all of my purchased movies on a hard drive bank, called a Network Attached Storage [NAS] drive. I then use a player [WDTV Live Plus with the B-Rad's WDLXTV firmware loaded on it] to browse and then play the movie files from my NAS on to my TV. Usually, when you are selecting a movie file, it would look something like this. Let's be honest - this is way boring. So, with the proper amount of configuration, instead of displaying the box and the movie name - it shows all the information you could possibly want to know about the movie.  A few examples of moviesheets are available at the end of this blog post.

How do I use those nifty Video and Audio quality badges that I see in your screenshots, in my movie sheets?
In Thumbgen's "Comments:" field, you may add any of the following (on its own line) to produce the quality rating for video - Shown in a 5 star scale.  Any of the following are valid input to create a video quality badge.

  • p 3/5
  • P 3/5
  • Picture 3/5
  • picture 30/100
  • p 3.4/8
  • p 3.75/10.8
Using the same naming conventions, you can do the same thing for the "Audio" quality badge.  Eventually, I have plans to Automate this, so that the template will get the badge for you automatically when you load the template, if you desire.


The background of the template doesn't match the background of my player.  How can I fix this? 
You have two options:
  • Change your player to match the templates - Because all players are different in the configuring the background, I will leave you to research how to do this for your specific player.  What you will need however, is the image file that is used for the background of the templates.  You can find this at \\Templates\Common\RedVelvet.jpg.
  • Change the templates to match your player - First off, you will need to get a copy of the 1280x720 image that your player uses.  The easiest way to go about changing the template background from here would be to rename your image "RedVelvet.jpg" and then copy it into the \\Thumbgen\Common\ directory.  Alternatively, you can copy your background image into the Common directory.  Then, go through the 3 "template.xml", and find the Template -> ImageDrawTemplate -> Elements -> ImageElement, with the name of "Background".  Change the "Source Path" value of this node to "%PATH%\..\Common\[YOUR PICTURE NAME].jpg"
I really like your templates and I would like to stay current with your updates.  How can I keep in touch?
  • Feel free to add me on Facebook.  I post updates and other information and give alerts when I put new builds out.  Find me at my Facebook Profile.  Also, you may check back at the main page of this blog to see whats new.
 How can I help improve the quality of these sheets?
  • I am definitely open to new suggestions for the code.  If you have a good idea that could make my sheets more usable to you, then I would LOVE to hear about it. Please leave a comment here or email me at jhspyhard@hotmail.com, with "SHEET IDEA" as the subject line.
  • Bugs?! Where's my fly swatter!?  I've done my best to release the highest quality code possible, but it is of course almost impossible to release completely bullet-proof code.  If you find a bug or something that doesn't seem correct, please let me know so I can correct it. Please leave a comment here or email me at jhspyhard@hotmail.com, with "SHEET BUG" as the subject line. Let me know which sheet you were using when you found the error and you may want to include a ThumbGen metadata file so that I can recreate your problem easily.

Version 0.9.3a

Another nice update.
Download JHSMoviesheets 0.9.3.

Features added to the templates during this release.
  1. JHS Movie Sheets
    • Auto Empty Values - Added code to use a value of "n/a" if the Thumbgen value for that text field is empty. 
    • Reposition of Studio Graphic - I had changed this value before, I am changing it one more time.  Hopefully this will be the last time I will need to worry about it.
  2. JHS Season Sheets
    • Copy/Paste Problem- A bug introduced in 0.9.2, where the graphic used for the disc box is a season box.
    • Code Consolidation - Removed unused / redundant methods; Reused the getStatBoxPosition( ) function instead of the custom getSeasonStatBoxPosition( ).
    • Auto Empty Values - Added code to use a value of "n/a" if the Thumbgen value for that text field is empty.
    • SPECIFIC TO 0.9.3A - Removed rogue debug "Test" popup dialog.
  3. JHS EpisodeSheets
    • Auto Empty Values - Added code to use a value of "n/a" if the Thumbgen value for that text field is empty.
    • Sporadic Failure of Studio Graphic - I am not sure why this happened off and on, but I am pretty sure I have a fix for it.  Removed the separator value from the Template Settings node.
    •  Reposition of Studio Graphic - I had changed this value before, I am changing it one more time.  Hopefully this will be the last time I will need to worry about it.
  4. Generic
    • Added Line Numbers To Debug Output - Added the code line number, after the method name from which the debug statement was called from the source code.

Friday, May 6, 2011

New Features, Bug Fixes - Version 0.9.2

Hey everyone.  This update is gonna be huge!

Download JHSMovieSheets v0.9.2 

Features added to the templates during this release.
  1. JHS Movie Sheets
    • Tokens Centralized - Put the Thumbgen tokens that the JHSMovieSheets suite uses, into its own file.
    • General Code Optimizations and Documentation - Removed unused functions + code.
    • Studios Image Automation - Shows you the first available studio image in your repository, from your list of studios.
  2. JHS Season Sheets
    • Tokens Centralized - Put the Thumbgen tokens that the JHSMovieSheets suite uses, into its own file.
    • General Code Optimizations and Documentation - Removed unused functions + code.
    • Automatic Episode Name Newline Spacing - If an episode name takes up too much space to fit on a single line, the episode numbering will automatically be adjusted to accommodate the extra line.
    • Dynamic Season / Disc Boxes - Added dynamic resizing capability to Season / Disc statistic boxes.
  3. JHS EpisodeSheets
    • Tokens Centralized - Put the Thumbgen tokens that the JHSMovieSheets suite uses, into its own file.
    • General Code Optimizations and Documentation - Removed unused functions + code. 
    • Dynmaic Season / Episode Boxes - Added dynamic resizing capability to Season / Episode statistic boxes. 
    • Added Studio Graphic and Image Automation -  Shows you the first available studio image in your repository, from your list of studios. 
    • Added A Guest Cast Auto Value - If no value exists for this, "n/a" is automatically displayed.
    • Inconsistent Image Quality Badge Image - Fixed this bug.
  4. Generic
    • Development Run/Compile Time Debug Output Capability - This provides a template developer a hook to get data at run time to view variables as they are processed, without having to short-circuit your method.  (You would be more or less, pausing execution) This is HUGELY helpful when designing the C# methods.

The new-line capability was especially tricky to get working.  The first approach I tried was counting the number of times that a certain character could be typed on a single line without going to a new line.  I then divided that number by 254 (the line width for episode names) to produce the width of the character.  However, I recognized pretty quickly this approach had problems.  Not only do you have up to .0005 rounding error, but also the end of line error since the individual characters won't divide into 254 evenly every time.  For example, if you have a line length of 30 and a character's ACTUAL width is 9, you can put 3 of those characters on a single line without it resetting to the next line. However, the calculated width would be 10 (30 width / 3 total), so you can see how error can be introduced that way.  When I decided that this error was producing too many false positives for new lines, I discovered that I can use Window's system libraries by using an XSL import statement (SO COOL!!) I started using the MeasureString( ) method to get the pixel count.  From the preliminary testing I have done, it looks pretty spot on, with no (or at least, a WHOLE lot less) false positives.

Anyways, it was fun creating this and I hope you guys have as much fun using it as I did making it.

Jim