Movie Preview list (making a short list)

If you have created a unique MLServeCmd that performs a unique task, please post it here so others can learn from them.
User avatar
rtarver
Senior Member
Senior Member
Posts: 118
Joined: Fri Dec 23, 2005 6:51 pm
Contact:

Movie Preview list (making a short list)

Postby rtarver » Mon May 11, 2009 8:28 pm

My wife and I have run into the problem of me calling off movies as I go through our collection while she says yay, nay, or maybe. By the time we've gone through all 500 movies we've forgotten the ones that were 'maybe'.

So I've created a script that helps me keep track of the possibles. I have it tied to the 'large' coverart of the currently selected dvd. When I tap the coverart, the macro runs. It will add that movie to what I call the 'maybe list'. My list can be up to ten long but yours could be longer/shorter. My macro works like a stack... When I push a movie to it, all the others in the stack drop down by one and if there's already one in slot ten, it gets pushed off the list. These ten movies are listed on my dvd scene, and the text box can either make that movie the current selection or play the movie.

I have three ML variables with ten iterations. I don't know if arrays are allowed, but it was late and once it worked I stopped. I have to track three variables to make the system work... dvdnumber, dvdtitle, dvdslot.

Here's my main script.


============================
Option Explicit

Sub dvdpreview (Params)

Dim i
dim client
client = params(0)

for i = 10 to 2 step -1

MLServer.SetVariable "dvdpreview_" & cstr(i) & "_dvdnumber_" & client, MLServer.GetVariable("dvdpreview_" & cstr(i-1) & "_dvdnumber_" & client)
MLServer.SetVariable "dvdpreview_" & cstr(i) & "_dvdtitle_" & client, MLServer.GetVariable("dvdpreview_" & cstr(i-1) & "_dvdtitle_" & client)
MLServer.SetVariable "dvdpreview_" & cstr(i) & "_dvdslot_" & client, MLServer.GetVariable("dvdpreview_" & cstr(i-1) & "_dvdslot_" & client)

next

MLServer.SetVariable "dvdpreview_1_dvdnumber_" & client, MLServer.GetVariable("dvdcurrentselection_dvdnumber_" & client)
MLServer.SetVariable "dvdpreview_1_dvdtitle_" & client, MLServer.GetVariable("dvdcurrentselection_title_" & client)
MLServer.SetVariable "dvdpreview_1_dvdslot_" & client, MLServer.GetVariable("dvdcurrentselection_slot_" & client)

end sub
============================



I also have a simple script to clear the list:

============================
Option Explicit

Sub dvdpreviewclear (Params)

Dim i
dim client
client = params(0)
for i = 10 to 1 step -1
MLServer.SetVariable "dvdpreview_" & cstr(i) & "_dvdnumber_" & client, ""
MLServer.SetVariable "dvdpreview_" & cstr(i) & "_dvdtitle_" & client,""
MLServer.SetVariable "dvdpreview_" & cstr(i) & "_dvdslot_" & client,""

next

end sub
============================

And finally, here is the label for my text box to display the listed movie. I have ten labels, but I'll bet you can figure out how they vary.

============================
1: {{dvdpreview_1_dvdtitle_{{clientname}}}}~175~30
============================


You can see an example below of my dvd page, and the ten listed movies (although there are only a few in the list at the moment). Hope this helps somebody out there. :)

Russ
You do not have the required permissions to view the files attached to this post.
Warp Speed now, and don't give me
any of that dilithium crystal crap!!!

User avatar
jjjukebox
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1024
Joined: Sat May 22, 2004 9:54 pm
Location: Toronto
Contact:

Postby jjjukebox » Tue May 12, 2009 12:11 am

rtarver,

This is an excellent idea! I have already borrowed your idea and implemented it. I am constantly trying to remember potential movies as I browse through my collection.

I did not used a cript but opted to use command maps to accomplish this because of the way my movie browser is set up.

HomeTek.MovieGallery.AddToShortList
Macro|
MLConditional|IsEqual##{{{{ClientName}}MovieShortlistNum}}####SetVariable|{{ClientName}}MovieShortlistNum~1!
SetVariable|{{ClientName}}MovieShortlistItem{{{{ClientName}}MovieShortlistNum}}Title~{{dvdcurrentselection_title_{{clientname}}}}!
SetVariable|{{ClientName}}MovieShortlistItem{{{{ClientName}}MovieShortlistNum}}DVDNumber~{{dvdcurrentselection_dvdnumber_{{clientname}}}}!
SetVariable|{{ClientName}}MovieShortlistItem{{{{ClientName}}MovieShortlistNum}}DVDLocation~{{dvdcurrentselection_movielocation_{{clientname}}}}!
MLConditional|IsEqual##{{{{ClientName}}MovieShortlistNum}}##10##SetVariable|{{ClientName}}MovieShortlistNum~1##MLMath|Add~{{ClientName}}MovieShortlistNum~{{{{ClientName}}MovieShortlistNum}}~1

HomeTek.MovieGallery.ClearShortListItems
Macro|
SetVariable|{{ClientName}}MovieShortlistItem1Title~!
SetVariable|{{ClientName}}MovieShortlistItem1DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistItem2Title~!
SetVariable|{{ClientName}}MovieShortlistItem2DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistItem3Title~!
SetVariable|{{ClientName}}MovieShortlistItem3DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistItem4Title~!
SetVariable|{{ClientName}}MovieShortlistItem4DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistItem5Title~!
SetVariable|{{ClientName}}MovieShortlistItem5DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistItem6Title~!
SetVariable|{{ClientName}}MovieShortlistItem6DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistItem7Title~!
SetVariable|{{ClientName}}MovieShortlistItem7DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistItem8Title~!
SetVariable|{{ClientName}}MovieShortlistItem8DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistItem9Title~!
SetVariable|{{ClientName}}MovieShortlistItem9DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistItem10Title~!
SetVariable|{{ClientName}}MovieShortlistItem10DVDNumber~!
SetVariable|{{ClientName}}MovieShortlistNum~1

Below are examples of how I implemented this. I touch the coverart to add the movie to the shortlist. Within the Shortlist overlay I press the PLAY button beside to title to play the movie or press the movie title to remove the Shortlist overlay and view the movie synopsis.

Great work!

Thanx
You do not have the required permissions to view the files attached to this post.
J.J. Jukebox
Member

User avatar
rtarver
Senior Member
Senior Member
Posts: 118
Joined: Fri Dec 23, 2005 6:51 pm
Contact:

Postby rtarver » Tue May 12, 2009 8:25 am

JJ,

You must have jumped on that one really quick to have found it and already coded up your scenes. It's like kindergarten.... it's all about sharing. :)

I think your code is a little simpler in that you keep track of the count and just add to the bottom of the list. Mine iterates through and pushes everything down by one. When I tap a movie in the short list, it makes it the currentdvd, so I can see coverart and synopsis again.

Rus
Warp Speed now, and don't give me

any of that dilithium crystal crap!!!


Return to “MLServeCmd Examples”

Who is online

Users browsing this forum: No registered users and 1 guest