2009-03-22, 22:05
ekim232 Wrote:You definitely got some good things going on with this skin. After checking out some of the screens I was noticing you had icons for movie studios.
This is something that I am working on right now. I am trying to figure out the best way to code it. I know I can do a stringcompare to match studio names from my .nfo files, but that is a lot of coding when you have upwards of 50 studio possibilities. How did you go about it?
I used the following for rating, which wasn't bad because there was a small number, but I am hoping to have another way for studios.
<visible>substring(listitem.mpaa,Rated G)</visible>
I'm sure a more clever way could be devised, but I opted to go the straight and simple, and just made a separate image control for every studio. It's really not too bad if you make a generic tag and then fill in the visibility and texturename. For the visibility part, I use substring instead of stringcompare, which makes it a bit more flexible. An example is:
Code:
<visible>substring(listitem.studio,MGM) | substring(listitem.studio(Metro) | substring(listitem.studio(Goldwyn) | substring(listitem.studio(Mayer)</visible>
I'd imagine you could also go the way of having "disney.png" and then setting the <label> tag to $INFO[listitem.studio,,.png], but this isn't as reliable as the other method due to the fact that studio names are often not always written the same way when scraped. Metro Goldwyn Mayer, MGM, (MGM) and their various substudios is a great example.
So, the coding sounds a little daunting because of the volume, but in reality, it's not too bad.