SCRIPTING
If
Shortcut Input
does not have any value
SHARING
Get clipboard

Clipboard
VARIABLES
Set variable
Url
to
Clipboard
SCRIPTING
Otherwise
VARIABLES
Set variable
Url
to
Shortcut Input
SCRIPTING
End If

If Result
DOCUMENTS

File
SCRIPTING
Count
Items
in
File

Count
SCRIPTING
If
Count
is not
0
SCRIPTING
Get dictionary from
File

Dictionary
SCRIPTING
Get
Value
for
Api
in
Dictionary

Dictionary Value
VARIABLES
Set variable
Api
to
Dictionary Value
SCRIPTING
Get
Value
for
App
in
Dictionary

Dictionary Value
VARIABLES
Set variable
App
to
Dictionary Value
SCRIPTING
Otherwise
MATHS
Random number between
and
10000

Random Number
TEXT
ADIOSbyHFP
Random Number

Text
VARIABLES
Set variable
App
to
Text
NETWORK
Get contents of
https://api.alldebrid.com/v4/pin/get?agent=
App
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
data.user_url
in
Contents of URL

Dictionary Value
SAFARI
Show web page at
Dictionary Value
SCRIPTING
Get
Value
for
data.check_url
in
Contents of URL

Dictionary Value
NETWORK
Get contents of
Dictionary Value
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
data.apikey
in
Contents of URL

Dictionary Value
VARIABLES
Set variable
Api
to
Dictionary Value
DICTIONARY

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

Saved File
SCRIPTING
End If

If Result
TEXT
Url

Text
SCRIPTING
If
Text
does not have any value
SCRIPTING
Show alert
Informational Message
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
SCRIPTING
If
Text
begins with
magnet:
NETWORK
Get contents of
https://github.com/anars/blank-audio/raw/master/10-seconds-of-silence.mp3
Options Under Construction

Contents of URL
DOCUMENTS
Save
Contents of URL
Destination Path
/Shortcuts/TextOverwrite If File Exists

Saved File
NETWORK

Contents of URL
SCRIPTING
Get
Value
for
data.magnets.1.id
in
Contents of URL

Dictionary Value
VARIABLES
Set variable
MagnetID
to
Dictionary Value
SCRIPTING
Repeat
250 times

Repeat Results
DOCUMENTS

File
NETWORK

Contents of URL
SCRIPTING
Get dictionary from
Contents of URL

Dictionary
SCRIPTING
Get
Value
for
data.magnets.status
in
Dictionary

Dictionary Value
TEXT
Dictionary Value

Text
SCRIPTING
If
Text
is
Uploading
SCRIPTING
SCRIPTING
SCRIPTING
End If

If Result
SCRIPTING
If
Text
is
Ready
NETWORK

Contents of URL
SCRIPTING
Get
Value
for
data.magnets.links
in
Contents of URL

Dictionary Value
SCRIPTING
Get dictionary from
Dictionary Value

Dictionary
SCRIPTING
Repeat with each item in
Dictionary

Repeat Results
SCRIPTING
Get
Value
for
link
in
Repeat Item 2

Dictionary Value
SCRIPTING
Get
Value
for
filename
in
Repeat Item 2

Dictionary Value
LIST

List
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
Choose from
Repeat Results
Prompt
Choose which links to download:

Chosen Item
SCRIPTING
Choose from Menu

Menu Result
SCRIPTING
Copy links to clipboard

Menu Result
VARIABLES
Set variable
Links
to
Input
SCRIPTING
Repeat with each item in
Chosen Item

Repeat Results
TEXT
Match
https?.*
in
Repeat Item 2

Matches
NETWORK
Get contents of
https://api.alldebrid.com/v4/link/unlock?agent=
App
&apikey=
Api
&link=
Matches
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
data.link
in
Contents of URL

Dictionary Value
TEXT
Dictionary Value

Text
VARIABLES
Add
Text
to
Links
SHARING
Copy
Links
to clipboard
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
Show alert
Informational Message
SCRIPTING
Download files

Menu Result
SCRIPTING
Repeat with each item in
Chosen Item

Repeat Results
TEXT
Match
https?.*
in
Repeat Item 2

Matches
NETWORK
Get contents of
https://api.alldebrid.com/v4/link/unlock?agent=
App
&apikey=
Api
&link=
Matches
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
data.link
in
Contents of URL

Dictionary Value
SAFARI
Open
Dictionary Value
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
Share links

Menu Result
VARIABLES
Set variable
Links
to
Input
SCRIPTING
Repeat with each item in
Chosen Item

Repeat Results
TEXT
Match
https?.*
in
Repeat Item 2

Matches
NETWORK
Get contents of
https://api.alldebrid.com/v4/link/unlock?agent=
App
&apikey=
Api
&link=
Matches
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
data.link
in
Contents of URL

Dictionary Value
TEXT
Dictionary Value

Text
VARIABLES
Add
Text
to
Links
SCRIPTING
End Repeat

Repeat Results
SHARING
Share
Links
SCRIPTING
Share files

Menu Result
SCRIPTING
Repeat with each item in
Chosen Item

Repeat Results
TEXT
Match
https?.*
in
Repeat Item 2

Matches
NETWORK
Get contents of
https://api.alldebrid.com/v4/link/unlock?agent=
App
&apikey=
Api
&link=
Matches
Options Under Construction

Contents of URL
SCRIPTING
Get
Value
for
data.link
in
Contents of URL

Dictionary Value
NETWORK
Get contents of
Dictionary Value
Options Under Construction

Contents of URL
SHARING
Share
Contents of URL
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
End Menu

Menu Result
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
Get
Value
for
data.magnets.seeders
in
Contents of URL

Dictionary Value