Comments (19)
You just need to escape the argument value properly:
--def exec="curl \"http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid={info.id}\""
from scripts.
FileBot will use powershell -Command
instead of cmd /c
starting with r4757
.
from scripts.
Interesting request! You can easily get the series ID via xattr
from the file.
Come to think of it... if xattr
is working, then this will work right out-of-the-box:
--def exec="curl 'http://localhost:8081/api/APIKEY?cmd=show.refresh&tvdbid={info.id}'"
from scripts.
Thanks! This will complete my automation process for TV shows!!
In my shell script that's called by Deluge, I have the amc script being executed, followed now by:
filebot -script fn:xattr --def exec="curl 'http://localhost:8081/api/APIKEY?cmd=show.refresh&tvdbid={info.id}'"
I gave it a shot with a new torrent but no luck :/ for testing, I also called it straight from terminal and plugged in a defined value for a show I have instead of using {info.id} to see if it would work, but it did not. I only see 'done' and your emoji after running it at the terminal. I don't have any files being generated by xattr as I haven't used it before...does that matter here or is my command set up wrong? I'm leaning towards the latter...
As a note, when I pasted that URL into the browser with a defined tvdb ID, it successfully updated in Sickrage. In both the script and when I pasted into the browser, I was sure to add the API key in.
Appreciate your time :)
from scripts.
--def exec
is an option for the amc
script. You do not need to use the xattr
script.
from scripts.
Hi rednoah,
I cant seem to get this to work;
--def exec="curl 'http://localhost:8081/api/APIKEY?cmd=show.refresh&tvdbid={info.id}'"
Is the {info.id} variable still valid? The only variable I can get to work is {folder}
Thanks!
from scripts.
First I'd like to apologize that I hadn't confirmed this was working. It works great. I'm using exactly the code from above (with a change to the IP and APIKEY). So the info.id variable is working. Of course make sure you have curl installed too.
exec="curl 'http://localhost:8081/api/APIKEY?cmd=show.refresh&tvdbid={info.id}'"
from scripts.
Thanks for the reply vember, So you are using the latest amc script? and does your still work if you change the action to test?
I have this exact line in my code apart from the api key is my key:
exec="curl 'http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid={info.id}'"
And the output:
Execute: curl 'http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid='
{"data": {}, "message": "The required parameter: 'tvdbid' was not set", "result": "error"}
from scripts.
Turns out this command gives the above error if you have the action set to test. When it is set to copy or move etc {info.id} works correctly.
from scripts.
{id}
should be giving you the series id. Use --def exec="echo {json}"
to see the raw metadata as json.
from scripts.
I cannot seem to get this to work in Windows.
I am not a super experienced, but i thiink it is because of the quotes around it.
When i use this one. in cmd with double quote instead of a single it does work..
Like this.
curl "http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid={info.id}"
Instead of
curl 'http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid={info.id}'
But when i try to but it together with AMC, i need to write it out like Maximillion did where there are single quotes on the link, otwerwise it won't go trhough.
exec="curl 'http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid={info.id}'"
from scripts.
curl
is a Unix tool and won't work on Windows'...'
style quotes won't work on Windows
Open Windows CMD and see if you can write a command that will tell Sick* to refresh itself.
Trying to use the --def exec
option without basic command-line skills is completely nonsensical and will not lead to success. ;)
from scripts.
Yea i know. the commands line works fine, as i installed curl for windows.
as in it returns this.
curl "http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid={info.id}"
{"data": {}, "message": "Xhas queued to be refreshed", "result": "success"}
but i am not able to use
exec="curl 'http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid={info.id}'"
because of the different quotes.
The command does run, but because it runs like
'http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid={info.id}'
instead of
"http://localhost:8081/api/KEY?cmd=show.refresh&tvdbid={info.id}"
it doesn't work, and i am not sure how to fix this. if possible it is possible. Or is there a easier way to get it to work on windows?
from scripts.
So you can do it that way, nice to know :) Sadly it doesn't seem to fix the problem, might be because of the &, which might be understood wrong..
as in only this paremeter goes through
Parameter: exec = curl "http://localhost:8081/api/KEY?cmd=show.refresh
and ends up giving an error after the &
'tvdbid' is not recognized as an internal or external command, operable program or batch file.
It might be understood as a double command.
from scripts.
Well, a round of applause for CMD taking stupid to a whole new level.
Here's how it works:
http://stackoverflow.com/a/15262019/1514467
from scripts.
When do you think r4757 will be available?
from scripts.
Have you tried the latest release?
$ filebot -version
FileBot 4.7.8 (r4846)
from scripts.
Apologies, I was watching script commits rather than FileBot, my mistake. Thanks!
from scripts.
Confirmed this command format works perfectly now in QBittorrent:
exec="curl 'http://localhost:8081/api/YOURAPIKEY?cmd=show.refresh&tvdbid={info.id}'"
Thank you!
from scripts.
Related Issues (20)
- script fn:suball fails immediately if movies have trailers HOT 16
- fn:amc "pre-exec" HOT 15
- 70% of time wrong tmdb (imdb) info HOT 5
- amc.groovy creates zero size files HOT 1
- Groovy and passing a mount path HOT 4
- TVDB artwork script is broken HOT 16
- AMC weird movie grouping issue. HOT 2
- Using amc with filebot 4.8.5 throws error HOT 2
- Don't exit with 100 status code in amc if no files are found HOT 1
- Can't download subtitles for media over 30 days old HOT 2
- Select Database for Movie Metadata HOT 4
- `keywords` property missing from `MovieInfo` object HOT 1
- amc error when skipping small video files HOT 2
- Exception in phase 'semantic analysis' in source unit 'Script1.groovy' HOT 2
- Duplicates Script logical list output HOT 1
- The Movie DB for series? HOT 1
- Invalid usage: The --output folder option is required HOT 2
- Feature Request: Generate Episode NFO Files HOT 2
- nfo.groovy Script Error HOT 3
- No such property (how to test/develop) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scripts.