xDatabase

Xlobby plugin development

Re: xDatabase

Postby CiXel on Fri Apr 25, 2008 1:12 pm

In the quest for a flat database option, doing a custom search for ALL works about 98% of the way. The only real issue is that since an xdb.all event gets applied to folder as well they show up too, but that's not you ;) Thank you for re-adding the xdb.all option. I'm getting closer to fleshing this out.
CiXel
 
Posts: 181
Joined: Tue Feb 22, 2005 6:27 pm
Location: New York

Re: xDatabase

Postby S Pittaway on Sat Apr 26, 2008 12:08 pm

try the "use type" option, you can then search for xdb.all == "movie" (if you are talking about the movie db)
S Pittaway
 
Posts: 713
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Re: xDatabase

Postby CiXel on Sat Apr 26, 2008 12:50 pm

S Pittaway wrote:try the "use type" option, you can then search for xdb.all == "movie" (if you are talking about the movie db)


Hmm, I don't understand what you are suggesting? Could you elaborate a little?
CiXel
 
Posts: 181
Joined: Tue Feb 22, 2005 6:27 pm
Location: New York

Re: xDatabase

Postby S Pittaway on Sat Apr 26, 2008 5:30 pm

i was too lazy to go back a page and look what i called it :) anyway,

added ini file option - General - Add All Entry Value, if this is blank it xdb.all is set to the "type" field, if not this text is used.

if you leave it blank it will copy the type field, for the movie database thie is either movie or folder depending on if its a folder or not.
S Pittaway
 
Posts: 713
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Re: xDatabase

Postby CiXel on Sun Apr 27, 2008 12:40 am

Ah yes, the 'type' field works great. It denotes folders as 'folder' and movies as 'movie'.
xDatabase does it again.

So close...
Now the LAST step in this equation is getting all of the titles to appear in one single alphabetical list ;) As it stands right now, it displays a-z on the the first folder 's items then a-z on the second folder's. I'd like it to display as if you ran a sorttitle filter, like when you open the search screen. But this will still be usable (WAF)

Just think, after all this I get to try to make Theatertek run via xLobby's USBUIRT plugin... Fun!
CiXel
 
Posts: 181
Joined: Tue Feb 22, 2005 6:27 pm
Location: New York

Re: xDatabase

Postby S Pittaway on Tue Apr 29, 2008 8:41 am

i had a play with reflections -
1.jpg


It works but the code is a bit stinky, can anyone help? please have a nosy at http://www.xlobby.com/forum/viewtopic.php?f=6&t=6336&p=45243#p45243
S Pittaway
 
Posts: 713
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Re: xDatabase

Postby S Pittaway on Wed Jun 04, 2008 3:53 pm

Updated

4 Jun 2008 - Added support for star images for imdb ratings and user ratings
4 Jun 2008 - Added support for image reflections


Star Images

To use the star images you need to set this in the ini file

[Settings]
Format Star Image = image directory\filename*.ext

Where image directory is the path to the star images, filename is the common name and * ranges from 1 to 100.

For example you could have a collection of star images like this C:\Stars\stars-1.png .. C:\Stars\stars-10.png .. C:\Stars\stars-100.png and you would set the ini file entry to be Format Star Image = C:\Stars\stars-*.png

CiXel has made up some star images that you can use, if you are a pay-lobby user you can find them in the my xlobby section under add on downloads.



Refections

Reflections are controlled via two entries in the inifile -

[b]xCache - Thumb Reflectivity = double[\b]
This controls the reflectivity of the shadow image and can vary from 0 to 1.
If it is 0 the no reflection is added, If it is 1 all of the image will be reflected.
I think a good value is 0.33

[b]xCache - Thumb Reflectivity Blend Color = text[\b]
This determines the type of reflection that is generated.
If it is left blank (or set to TRANSPARENT) a "real" reflection is added that can be over-layed on another background image - i.e. its a transparent reflection. To do this the file type must be set to png!
Transparent reflections seem to seriously slow down xlobby and they burn up memory really quickly. It may even cause memory errors if you have a large amount of coverart...
If it is set to a solid colour i will simply fade the reflection into that colour. This means you can use jpgs which saves a lot of memory!
If you screen is using a solid background go for the solid type - its quicker to draw and uses a lot less memory - i guess this is why the apple uses a black background :)

Here is an example of a solid refection -
Solid.jpg



Here is a of a transparent one (like i said they tend to be quite big, this is the only one i could find less than a 1 MB :))-
t-g.[.backup.].avi's.the.day.today.folder.jpg.png
Last edited by S Pittaway on Thu Jun 05, 2008 8:37 am, edited 1 time in total.
S Pittaway
 
Posts: 713
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Re: xDatabase

Postby CiXel on Wed Jun 04, 2008 3:56 pm

Wow-
That transparent one is REALLY transparent ;)

On a side note. Nice work. It'll be interesting to try this out over the weekend. xDatabase does it again.
CiXel
 
Posts: 181
Joined: Tue Feb 22, 2005 6:27 pm
Location: New York

Re: xDatabase

Postby Marbles_00 on Wed Jun 04, 2008 4:30 pm

8) VERY 8) indeed. Looking forward to incorporating this...I just have to get off my keester, and get back into skinning.
Image
Mayhem Creations
where my:
    -Music Distribution
    -HTPC
    -MediaPVR
    -UnRAID box
    -OTA
are all discussed.

Xlobby Free Zone
Marbles_00
 
Posts: 1882
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: xDatabase

Postby S Pittaway on Thu Jun 05, 2008 8:43 am

The pngs with transparency tend to be quite big :) i couldent see one that was less then the 1Mb upload limit, i found one last night :)

Its usable but i have had to chose my cover sizes carefully to keep xlobby from crashing (and thats on a xp system with 4Gb of mem (i know xlobby can only access 2Gb but still...):))


Hopefully Wes will notice this and add reflections to the category offset/rotate funtionallity (category>photo>cover>-5>0.55 etc)
S Pittaway
 
Posts: 713
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Re: xDatabase

Postby CiXel on Thu Jun 05, 2008 10:33 am

Yeah, it's definitely a small visual thing that can add a lot of 'slickness' to a skin.
CiXel
 
Posts: 181
Joined: Tue Feb 22, 2005 6:27 pm
Location: New York

Re: xDatabase

Postby scottw on Thu Jun 05, 2008 2:40 pm

Ok I must be doing something wrong. I am trying to setup the stars and cannot get it to show anything but 0 stars.

I am starting off with using xAnt so my movies Db shows a list of movies and the appropriate tags, one being "rating" with for example 51/10 (which I think is supposed to be 51 out of 100). I setup the ini by adding:
Code: Select all
[Settings]
Format Star Image = c:\xlobby\stars\Stars5-*.png

[movies]
IMDB - Generate stars  = true


I run a xDatabase "database add extra tags" with a variable of "movies". I get a new tag added called "xdb.imdb.star.rating.image" with a value of "c:\xlobby\stars\Stars5-0.png, it is Stars5-0.png for all movies no matter what the rating is.

What am I missing???
Scott
scottw
 
Posts: 777
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: xDatabase

Postby S Pittaway on Fri Jun 06, 2008 8:02 am

ok, this will only work on two fields.

one is the user rating added by this plugin it is called xdb.rating, this is a simple 5 character rating (the plugin has functions to toggle/set etc).

the other is the imdb user rating which has a format of 0.0-10.0 / 10.0. If the spider is run against imdb it is normally pulled across and saved in a tag called imdb_rating.

A tag called rating is normally used to store the film classification (u, pg, 15 etc).

If you dont have a imdb_rating tag it will use a rating of 0.0 (seems fair enuff) and so set it to a stars5-0.png image.

If you have a rating tag name and its format i can easily add in to the plugin (as long as it does not conflict with any of the fields i use :))
S Pittaway
 
Posts: 713
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Re: xDatabase

Postby Rusty on Thu Jul 03, 2008 2:49 pm

Ok here is what I have so far in the ini file.

[movies]
xCache - Thumbs Reflectivity = .33
xCache - Thumbs Reflectivity Blend Color = TRANSPARENT
xCache - Thumbs Cache Type (jpg/png ect) = png
xCache - Thumb Cache Type (jpg/png ect) = png

// Draw the main image to oGraphic

// Copy the bottom of the main image to RGraphic / RImage

//Now flip it
RImage.RotateFlip(RotateFlipType.RotateNoneFlipY);

// Finish the reflection using a gradiend brush
LinearGradientBrush brush = new LinearGradientBrush(PictureRectangle, Color.FromArgb(200, Color.Black), Color.FromArgb(255, Color.Black), 90, false);
RGraphic.FillRectangle(brush, PictureRectangle);

//Draw the reflection on the main image
SrcRectangle = new Rectangle(0, 0, RImage.Width, RImage.Height);
PictureRectangle = new Rectangle(0, Height, Width, RHeight);
oGraphic.DrawImage(RImage, PictureRectangle, SrcRectangle, GraphicsUnit.Pixel);

Also have a command to xcashe_update when I "goto movies".

It is creating the images to the folder and converting them to PNGs. But it is still not creating the reflections. What am I missing? It looks good what you have going on. Thanks.
Rusty
 
Posts: 6
Joined: Wed Jul 02, 2008 2:46 pm

Re: xDatabase

Postby S Pittaway on Thu Jul 03, 2008 4:21 pm

somethings got confused there because you have some c# code in it :)

upload the xdatabase.ini file and i will have a quick look.


btw, you only need to call "xcache update" when you add new items to the database, dont call it everytime you enter!

call it once - let it run - it may take a while to generate all of the covers...

when its done the new coverart should show up.
S Pittaway
 
Posts: 713
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

PreviousNext

Return to Plugins

Who is online

Users browsing this forum: No registered users and 1 guest

cron