NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 71 72 73 74 75 … 93 Next »
Pre My Vids 3.2

 
  • 0 Vote(s) - 0 Average
Pre My Vids 3.2
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#51
2005-05-17, 03:02 AM
heres some, i started workign on a db editing tool, havent gotten around to finishing it yet, at the moment it only works for actors.

Code:
OleDbCommand command = new OleDbCommand("SELECT * FROM ActorInfo ORDER BY ActorName",conn);            
OleDbDataReader reader = command.ExecuteReader();
while(reader.Read()){
Image poster = null;
try
{
byte[] bytes = (byte[])reader.GetValue(5);
if(bytes != null)
{
MemoryStream stream = new MemoryStream(bytes);
poster = Image.FromStream(stream);
}
}
reader.GetValue(5) is just the column number of the image. then just use picBox.Image = image;

and to store an image use

Code:
System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand();
OleDbConnection conn = new OleDbConnection(connstring);    

conn.Open();

command.CommandText = "UPDATE ActorInfo SET ActorPhoto=? WHERE ActorURL=?";
command.Connection = conn;
command.Prepare();

command.Parameters.Add("ActorPhoto", System.Data.OleDb.OleDbType.Binary);
command.Parameters.Add("ActorURL", System.Data.OleDb.OleDbType.VarChar);

command.Parameters[0].Value = ImageToByteArray((Image)HeadShot.Clone());
command.Parameters[1].Value = ActorURL;
            
                        
command.ExecuteNonQuery();

conn.Close();

heres the ImageToByteArray() method
Code:
internal byte[] ImageToByteArray(Image image)
{
using(image)
{
MemoryStream stream = new MemoryStream();
image.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
return stream.ToArray();
}
}
markm
Offline

Member

Posts: 86
Threads: 16
Joined: Feb 2004
#52
2005-05-17, 03:36 AM
Thanks!!! Man that was killing me. I knew it had to do with the memory stream, I just couldn't get it sorted out.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#53
2005-05-17, 03:47 AM
np, it took me a while to figure that out, many hours googling Smile
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#54
2005-05-17, 04:28 AM (This post was last modified: 2005-05-17, 04:41 AM by reven.)
what should i call the "Play with trailers" option (its sounds dumb) also the "play theatre like experience" (err the "Dolby" intro before the movie) and what other options do you guys want? (sub added the video queue to the next release, so im implementing it Smile).

oh and what should the order be,
trailers then intros then movie
or
intros then trailers then movie

intros = dobly etc video
trailers = well trailers Tongue
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#55
2005-05-17, 06:42 AM
btw there wont be anymore pre release of my vids until the next version of gbpvr is released, ive already started to implement the new features sub has added to the next release, which means it will no longer run on 0.91x
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#56
2005-05-17, 08:18 AM
oh and if you are using the prerelease version of gbpvr and you want to try the updated my vids (with stacking, and a few extra things (small things nothing major)), just pm me with your email and ill email it to you (or attach it to the pm, if thats possible ...).
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#57
2005-05-17, 06:31 PM
Well, Here's how PlayMe let's it work so I'll go by that. It has options and paths for trailes and intros (two seperate fields). If you want them activated you place a check mark next to the option then set the appropriate path. IF you give it a directory only it'll randomly pick a file from that directory to play. If you give it a specific file, it'll play that file everytime.

Intros - typically only one file is choosen.
Trailers - A user configurable option for how many trailers to play is given. I typically have it play at most 3 trailers, but this should be configurable. Also, it would be nice if it kept track of the trailers that it played and didn't repeat.

Another option for trailers is to give the ability to specify specific trailers to play with a movie. I personally use the random feature but could see others wanting to specify the trailers.

As for order, here is what I see is needed, based on whether the Intro/Trailer options are activated:

Intro, Trailer, Movie
Trailer, Intro, Movie

As always, there should be an option to just play the movie without the Intro or Trailers.

That should cover my needs.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#58
2005-05-17, 08:51 PM
at the moment i have it working like this
intros- you define a path and must enable it, every file is played in this directory in alphabetical order (so you can call them "1.mpg" "2.mpg" etc)
trailers - define a path, must enable it, pick how many you want to play, and it will randomly (true random, with a seed for all those geeks out there) play x number of trailers.

and at the moment it plays them in this order
trailers, intro, movie

and only if you choose "Play Movie" normal playback = "Play Video", if anyone comes up with a better name let me know.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#59
2005-05-18, 01:15 AM
Optionally, it would be nice if we could play an intro at Random as well, instead of having to name them a certain sequence. Just drop them in the folder and it randomly chooses an intro to play. I have several Dolby Digital intros that I sometimes play before the movies, and as I find more I just drop them in the same folder.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#60
2005-05-18, 01:19 AM
ok ill add an option to
[o] play in order ([o] is my attempt at drawing a radio button in ascii art Smile)
[ ] play in random order

and a number updown box for the number of intros to play (this will only be used if play in random order is checked).
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (7): « Previous 1 … 3 4 5 6 7 Next »
Jump to page 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode