Home  |  Products  |  Downloads  |  Registration  |  Forums  |  Support  |  Database  |  My Profiler  |  T-Shirt Contest
Forums

The InterVocative forums are now closed to new postings.

Please visit the Invelos forums at www.invelos.com for DVD Profiler and related discussion.

These forums will remain available for reading indefinitely.

IVS Forums->DVD Profiler: Skins Discussion Page: 1  Previous   Next
Announcing: Automation for CCViewer database (Locked)
Author Message
TomGaines
Registered: September 24, 2001
Posts: 2,332
Posted:
Email this userVisit this user's homepageView this user's DVD collection
This release is for use with databases generated with my CCViewer program.

For what is it useful?
You can call up information from the CCV database inside of Profiler Skins via JavaScript.
You can generate reports with Word and Excel makros.
You can implement individual import scripts (when writing is fully implemented)
You can make batch changes (e.g. set certain locks for all profiles) (partially available at this point)

Reading the Viewer database data is fully implemented. Writing is only partially implemented at this point.

Any feedback is much appreciated!
I would also be happy to receive any product resulting from the use of this DLL. DVD Profiler Skins, Word reports, Excel makros,...
I am also happy to be of any help. Testing, advice etc.
Just ask!


  Cast & Crew Editor v1.5.0  /    TV Cast and Crew Data
TomGaines
Registered: September 24, 2001
Posts: 2,332
Posted:
Email this userVisit this user's homepageView this user's DVD collection
Small Update:
Added methods FindAppearances and GetMovieAwards
I think those are quite important for writing skins.


  Cast & Crew Editor v1.5.0  /    TV Cast and Crew Data
ya_shin
First think, then talk.
Registered: May 29, 2000
Posts: 6,245
Posted:
Email this userVisit this user's homepageView this user's DVD collection
Quoting TomGaines:
Quote:
Small Update:
Added methods FindAppearances and GetMovieAwards
I think those are quite important for writing skins.

While I have no real clue how this is supposed to work, after this I am really looking forward to somebody picking this up and make a skin around this...
Achim's Last Watched DVDs
goodguy
Take a toke of tea stick
Registered: September 19, 2003
Posts: 652
Posted:
Quoting TomGaines:
Quote:
You can call up information from the CCV database inside of Profiler Skins via JavaScript.

If you really want this to be usable from a skin, you should implement IObjectSafety for your publicly creatable objects. Otherwise, you get the browser security warning each time you select a new DVD in DVDProfiler.
Matthias
My DVD Profiler Tools:
Automation Object, Name Variants Plugin, Navigation History Plugin
TomGaines
Registered: September 24, 2001
Posts: 2,332
Posted:
Email this userVisit this user's homepageView this user's DVD collection
Quoting goodguy:
Quote:
If you really want this to be usable from a skin, you should implement IObjectSafety for your publicly creatable objects. Otherwise, you get the browser security warning each time you select a new DVD in DVDProfiler.

Thanks for the tip!
I haven't tried it in Profiler or in html yet, so I didn't encounter this problem yet.


  Cast & Crew Editor v1.5.0  /    TV Cast and Crew Data
goodguy
Take a toke of tea stick
Registered: September 19, 2003
Posts: 652
Posted:
A few more observations:

I wouldn't implement collections with proprietary properties and methods such as GetXxxByID, GetXxxByIndex, AddXxx, RemoveXxx. Instead, I would follow the generic implementation of a Collection (Count, Item, _NewEnum, Add, Remove) with Item(varIndex) as the default method and varIndex as Variant that is interpreted by data type as either an index or a key (ID). Since you use Visual Basic, you can do this fairly easy by using the VB Class Builder.

As for the database itself, I certainly would apply some normalization. Or is this intentional to keep user-defined SQL queries simple?
Matthias
My DVD Profiler Tools:
Automation Object, Name Variants Plugin, Navigation History Plugin
TomGaines
Registered: September 24, 2001
Posts: 2,332
Posted:
Email this userVisit this user's homepageView this user's DVD collection
Thanks for your feedback!
I am currently adjusting the collection implementations.

Which normalization would you apply for example? User-defined SQL queries is one of the features I like most about the viewer, therefore those should be simple to use.
With this in mind I can only think of very few things which can be argued that it could be changed.
PurchaseInfo, SRP and VideoFormat for example would be possible to include in the profiles table, but I wanted to keep it clean and not so cluttered up. Those would be additional 11 fields in the already big profiles table.


  Cast & Crew Editor v1.5.0  /    TV Cast and Crew Data
goodguy
Take a toke of tea stick
Registered: September 19, 2003
Posts: 652
Posted:
I wasn't thinking so much about the 1:1 relations (PurchaseInfo etc). But string fields with largely redundant data are candidates for lookup tables, e.g. Studios, Locality, Subtitles, Audio format fields, etc. Same goes for cast and crew names, maybe even roles.

Another thing is the ProfileID. Since most of the other data are related to it, I probably wouldn't use the string form as the primary key, instead I would assign an internal numeric key (autoinc) to each profile.

But please understand that I took only a cursory look at your database structure. Choosing the right level of normalization is a cumbersome task and one has to carefully weight performance, size and usability against another.

BTW, I also noticed that you don't have Unicode compression enabled for your string fields.
Matthias
My DVD Profiler Tools:
Automation Object, Name Variants Plugin, Navigation History Plugin
 Last edited: by goodguy
TomGaines
Registered: September 24, 2001
Posts: 2,332
Posted:
Email this userVisit this user's homepageView this user's DVD collection
Version 0.1.2
- IObjectSafety implemented
- Implementation of collections updated


  Cast & Crew Editor v1.5.0  /    TV Cast and Crew Data
SpaceFreakMicha
Cleansweeper
Registered: September 24, 2001
Posts: 1,161
Posted:
If IVS had half of your energy...

Another great idea Tom, thank you very much. 
"Doch frag nicht: Wie kommt es, daß die früheren Zeiten besser waren als unsere? Denn deine Frage zeugt nicht von Wissen."
TomGaines
Registered: September 24, 2001
Posts: 2,332
Posted:
Email this userVisit this user's homepageView this user's DVD collection
Here a very basic skin example. After you have downloaded the DLL and registered it (register.bat) the following code will list all awards and assigned episodes in your Profiler skin for that specific DVD (provided this info is available in your Viewer database).
Copy the code in a newly created skin (Edit skin) and replace the database path in line 7

<HTML>
<HEAD></HEAD
<BODY>
<SCRIPT language=javascript>

var Viewer = new ActiveXObject("CCVCtrl.Control");
var db = Viewer.Opendatabase("D:\\Apps\\Workspaces\\CastCrewViewer\\DLLCastCrewViewer\\TestScript.mdb");
var Profiles = db.Profiles;

var ProfileID = "Key_" + "<DP NAME="UPC" Formatted="NO">";
var Profile = Profiles(ProfileID);
document.write("<p><b>Awards:</b>");
for (var i = 1; i <= Profile.Awards.Count; i++)
{
var Award = Profile.Awards(i)
document.write( "<p>Award: " + Award.Award);
document.write("</br>Category: " + Award.Category);
document.write("</br>Won: " + Award.HasWon);
document.write("</br>Nominees: " + Award.Nominee + "</p>");
};

var Episodes = Profile.Episodes;
document.write("<p><b>Assigned Episodes:</b>");
for (var i = 1; i <= Profile.Episodes.Count; i++)
{
var Episode = Profile.Episodes(i);
document.write("</br>" + Episode.Number + " - " + Episode.Title);
};


</SCRIPT>
</BODY>
</HTML>


  Cast & Crew Editor v1.5.0  /    TV Cast and Crew Data
TomGaines
Registered: September 24, 2001
Posts: 2,332
Posted:
Email this userVisit this user's homepageView this user's DVD collection
New version v0.1.3
Now that my new CCViewer is released, I can finally release my latest version of the Automation DLL. Writing is now possible, too.

Also like the last time, example scripts are included:
For the example script for the writing function, you will need an Viewer XML export which has been done in the latest CCViewer version (v1.3.5).


  Cast & Crew Editor v1.5.0  /    TV Cast and Crew Data
IVS Forums->DVD Profiler: Skins Discussion Page: 1  Previous   Next