COMMENT
MovieCuts is a standalone shortcut that's based on a module built into ShowtimeCuts. It allows you to quickly lookup movie data.
*OMDb API Key Required
COMMENT
By Austin Griffis
DICTIONARY

Dictionary
VARIABLES
Set variable
App
to
Input
COMMENT
Above Is Main App Dictionary
COMMENT
Below Is Dictionary for UpdateKit
DICTIONARY

Dictionary
VARIABLES
Set variable
UpdateKit
to
Input
COMMENT
Dictionary for Check For Updates
DICTIONARY

Dictionary
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
Set
UpdateKit
to
Dictionary
in
Dictionary

Dictionary
DOCUMENTS
Save
File
Destination Path
/Shortcuts/AutoUpdateData.jsonOverwrite If File Exists

Saved File
COMMENT
This will count 0 every time so that the Shortcut will process faster.
VARIABLES
Get
Shortcut Input
VARIABLES
Set variable
Original Input
to
Input
SCRIPTING
Count
Items
in
Input

Count
SCRIPTING
If
Input
Condition
SHORTCUTS
Run
App

Shortcut Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
COMMENT
Set Prefs Path
VARIABLES
Get
App
SCRIPTING
If
Input
Condition
SCRIPTING
Get the
Device Name

Device Name
DOCUMENTS
Replace
[/:;|`*"'\\]
with
World
in
Text

Updated Text
TEXT
Replace Text
/prefs-
App
.json

Text
SCRIPTING
Otherwise
TEXT
App
/prefs.json

Text
SCRIPTING
End If

If Result
VARIABLES
Set variable
Prefs Path
to
Input
VARIABLES
Get
App
VARIABLES
Set variable
App Path
to
Input
TEXT
App
/API.json

Text
VARIABLES
Set variable
API Path
to
Input
COMMENT
Icon dictionary
DICTIONARY

Dictionary
VARIABLES
Set variable
Assets
to
Input
SCRIPTING
Get
Value
for
Icons
in
Dictionary

Dictionary Value
SCRIPTING
Get
Value
for
Black
in
Dictionary

Dictionary Value
VARIABLES
Set variable
Icons
to
Input
COMMENT
Check APIs
DOCUMENTS
Create Folder
Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'App', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
DOCUMENTS
Get
File Size
from
File

File Size
SCRIPTING
If
Input
Condition
VARIABLES
Get
File
VARIABLES
Set variable
API-Keys
to
Input
SCRIPTING
Otherwise
VARIABLES
Get
App
SCRIPTING
Repeat with each item in
Input

Repeat Results
VARIABLES
Get
API-Keys
SCRIPTING
Set
Repeat Item
to
Value
in
Dictionary

Dictionary
VARIABLES
Set variable
API-Keys
to
Input
SCRIPTING
End Repeat

Repeat Results
VARIABLES
Get
API-Keys
DOCUMENTS
Save
File
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'API Path', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]Overwrite If File Exists

Saved File
SCRIPTING
End If

If Result
COMMENT
Get/Set Preferences
DOCUMENTS
Create Folder
Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'App', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
DOCUMENTS
Get
File Size
from
File

File Size
SCRIPTING
If
Input
Condition
VARIABLES
Get
Preferences
VARIABLES
Set variable
Preferences
to
Input
SCRIPTING
Otherwise
VARIABLES
Get
App
VARIABLES
Set variable
Preferences
to
Input
DOCUMENTS
Save
File
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Prefs Path', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]Overwrite If File Exists

Saved File
SCRIPTING
End If

If Result
VARIABLES
Get
App
VARIABLES
Set variable
Current Version
to
Input
VARIABLES
Get
Preferences
SCRIPTING
Set
Version
to
Current Version
in
Dictionary

Dictionary
VARIABLES
Set variable
Preferences
to
Input
DOCUMENTS
Save
File
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Prefs Path', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]Overwrite If File Exists

Saved File
VARIABLES
Get
Preferences
SCRIPTING
Count
Characters
in
Input

Count
SCRIPTING
If
Input
Condition
SCRIPTING
Otherwise
VARIABLES
Get
Preferences
SCRIPTING
Set
Search Page #
to
1
in
Dictionary

Dictionary
VARIABLES
Set variable
Preferences
to
Input
DOCUMENTS
Save
File
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'class': 'magic', 'value': 'Prefs Path', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]Overwrite If File Exists

Saved File
SCRIPTING
End If

If Result
SHORTCUTS
Get my shortcuts

My Shortcuts
VARIABLES
Set variable
All Shortcuts
to
Input
COMMENT
API
VARIABLES
Get
API-Keys
VARIABLES
Set variable
omdbAPI
to
Input
SCRIPTING
If
Input
Condition
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Enter Key

Menu Result
SCRIPTING
Ask
Enter Your OMDb API Key

Provided Input
SCRIPTING
If
Input
Condition
SHORTCUTS
Run
App

Shortcut Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
VARIABLES
Set variable
omdbAPI
to
Input
VARIABLES
Get
API-Keys