Script idea: IMDB check

Discuss and share scripts and script files...
Post Reply
sTu_Deimus
Posts: 41
Joined: 01 Mar 2008 17:51
Location: Melbourne, Australia
Contact:

Script idea: IMDB check

Post by sTu_Deimus »

Hi all.

Here's a (somewhat self-serving) script idea I'd love to see created.

Supposing one had a bunch of files with names representing backups of movies, eg:

Superman.avi

I'd like to be able to right-click and run that script and have it fire-off a URL in a browser that searches for that name (without the extension etc) at IMDB.com.

Many such sites have standard search syntax, so I presume that syntax could be filled out with the name as found in the filename.

Does this sound like a piece of cake or what? :)

Stu.

admin
Site Admin
Posts: 64862
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Script idea: IMDB check

Post by admin »

Nice idea! Have an example for how to link to imdb by movie title?

admin
Site Admin
Posts: 64862
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Script idea: IMDB check

Post by admin »

admin wrote:Nice idea! Have an example for how to link to imdb by movie title?
Found some info: http://us.imdb.com/how_to_link

The rest is easy, I leave it as an excercise. :mrgreen:

Tips: POM, <curbase>

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Script idea: IMDB check

Post by TheQwerty »

Code: Select all

"Search IMDB" *>::Open("http://www.imdb.com/find?s=tt&q=<curbase>");
You might want to adjust the filter to only apply it to video files.


It would be nice if we had URLEncode() and URLDecode() functions available in scripting, Don. :wink:

admin
Site Admin
Posts: 64862
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Script idea: IMDB check

Post by admin »

TheQwerty wrote:

Code: Select all

"Search IMDB" *>::Open("http://www.imdb.com/find?s=tt&q=<curbase>");
You might want to adjust the filter to only apply it to video files.


It would be nice if we had URLEncode() and URLDecode() functions available in scripting, Don. :wink:
Yep, I'll add them.

@sTu_Deimus
That line of code from TheQwerty should be added into Portable File Associations/POM. If you need more help, say so.

sTu_Deimus
Posts: 41
Joined: 01 Mar 2008 17:51
Location: Melbourne, Australia
Contact:

Re: Script idea: IMDB check

Post by sTu_Deimus »

Yep, works a treat! Thanks :)

One question though... the only way I seem to be able to access it is via File-OpenWith.

The ContextSensetiveMenu:OpenWith doesn't show it (presume this one is windows generated).

Can I have such an entry appear on the root of the ContextSensetiveMenu ? :) Perhaps the fact that its an open-slather wildcard PFA makes it more suitable for this.

:)

Stu.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Script idea: IMDB check

Post by TheQwerty »

sTu_Deimus wrote:The ContextSensetiveMenu:OpenWith doesn't show it (presume this one is windows generated).

Can I have such an entry appear on the root of the ContextSensetiveMenu ? :) Perhaps the fact that its an open-slather wildcard PFA makes it more suitable for this.
You're correct here.

You could add the Open With button to your toolbar as well, but currently you can't trigger it via Right Click/Context Menu. I believe this will come eventually, but for now we have to live with only having all the other options.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Script idea: IMDB check

Post by serendipity »

sTu_Deimus wrote:Yep, works a treat! Thanks :)

One question though... the only way I seem to be able to access it is via File-OpenWith.

The ContextSensetiveMenu:OpenWith doesn't show it (presume this one is windows generated).

Can I have such an entry appear on the root of the ContextSensetiveMenu ? :) Perhaps the fact that its an open-slather wildcard PFA makes it more suitable for this.

:)

Stu.
Just to add few more points apart from what TheQwerty said. You can already use a small script which will open a custom menu on double-click. For example you can paste the below script in a text file inside XY's scripts folder and name it anything; say "OpenVIDs.xys".

Code: Select all

"Open Video with &Media player" 
    OpenWith "C:\Program Files\K-Lite Codec Pack\Media Player Classic\mplayerc.exe", s; 

"Search &IMDB database" 
    Open("http://www.imdb.com/find?s=tt&q=<curbase>");
You can change the path to your media player above accordingly.

Now put the below line in "Tools | List management | Portable file associations":

Code: Select all

"Open Videos" wmv;avi;mpg>::load "OpenVIDs"
Ofcourse you can add or remove extensions above and double clicking on those extensions will pop-up your created menu, in this case Open video with Media player and Search IMDB database.

admin
Site Admin
Posts: 64862
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Script idea: IMDB check

Post by admin »

TheQwerty wrote:It would be nice if we had URLEncode() and URLDecode() functions available in scripting, Don. :wink:
Next version. 8)

sTu_Deimus
Posts: 41
Joined: 01 Mar 2008 17:51
Location: Melbourne, Australia
Contact:

Re: Script idea: IMDB check

Post by sTu_Deimus »

Hi,

When I last looked at this (above)there was a partial workaround, but I ended up not using it due to whatever inadequacies were present... I see some comments above about upcoming/missing functionality that would help the cause. Any comment about improvements in this are in the current release?

Or, has something similar been directly implemented?

One thing I didn't mention back then, was the need to filter out specific tags in the filename, eg:

sometag.SuperBob (1234)[Somecode][geeba].avi

I'd like to filter all but the SuperBob for the URL trigger.

From the above example, I'd also like for XY to offer tree list columns based on those tags in brackets. eg. if XY sees [Somecode] in the name, it strips it from the filename display, and shows that value in that column. That is an inver-simplification but still seems like something XY could do.

Stu.

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Script idea: IMDB check

Post by nas8e9 »

sTu_Deimus wrote:Hi,

When I last looked at this (above)there was a partial workaround, but I ended up not using it due to whatever inadequacies were present... I see some comments above about upcoming/missing functionality that would help the cause. Any comment about improvements in this are in the current release?

Or, has something similar been directly implemented?
URLEncode and URLDecode have been implemented and are documented in the help file. Context menu editing isn't yet available; it may be part of the planned Custom Event Actions (CEA)-functionality.

I can't help you with your other questions, unfortunately.

sTu_Deimus
Posts: 41
Joined: 01 Mar 2008 17:51
Location: Melbourne, Australia
Contact:

Re: Script idea: IMDB check

Post by sTu_Deimus »

NP - Thanks for the info :)

Post Reply