If this is already supported I could not see it in the WIKI here https://www.mythtv.org/wiki/User_Jobs
I would find this feature very handy for writing my own scripts, should be easy to add. PLEASE ? thanks.
%season% would give the number of the season.
and
%episode% would give the number of the episode.
Edited to suggest two separate arguments to allow more flexible use than a single argument.
Add user job arguments for %season% and %episode%
Forum rules
Please be reasonable and positive with your feature requests, remember that all contributions to MythTV are by volunteers in their spare time. MythTV won't support piracy in any form, including torrents and use of soft cams, so to avoid embarrassment please do not ask.
* One suggestion per thread please. Do not post new suggestions in replies. *
Please be reasonable and positive with your feature requests, remember that all contributions to MythTV are by volunteers in their spare time. MythTV won't support piracy in any form, including torrents and use of soft cams, so to avoid embarrassment please do not ask.
* One suggestion per thread please. Do not post new suggestions in replies. *
Re: Add user job arguments for %season% and %episode%
Could you work out season and episode from startime and channelid with a bit of curl, API, grep and sed?
Phil
Code: Select all
#!/bin/bash
#call with StartTime and ChanId
echo "Startime is $1 Chanid is $2"
ALL=`curl -s 127.0.0.1:6544/Dvr/GetRecorded?StartTime=$1\&ChanId=$2`
SEASON=`echo $ALL | sed "s/></>\n</g" | grep 'Season' | sed "s!<[^>]*>!!g"`
echo season is $SEASON
EPISODE=`echo $ALL | sed "s/></>\n</g" | grep 'Episode' | sed "s!<[^>]*>!!g"`
echo episode is $EPISODE
Re: Add user job arguments for %season% and %episode%
Skinah,
At least in 0.28-pre %SEASON% and %EPISODE% work already.
I didn't test, but I thought upper case was required. Obviously, mythmetadatalookup
must have completed 1st (at least over here.)
At least in 0.28-pre %SEASON% and %EPISODE% work already.
I didn't test, but I thought upper case was required. Obviously, mythmetadatalookup
must have completed 1st (at least over here.)
Re: Add user job arguments for %season% and %episode%
Great, thanks for the good news that the feature is added. I'm using 0.27 Stable so will have to check out the 0.28 soon. I'm currently doing it with a MySQL lookup, but it would be much nicer to use the job arguments. I'll post my script for others to use once it passes enough testing on my system.
Re: Add user job arguments for %season% and %episode%
I think they were added in 0.25. I'd try before upgrading to 0.28-pre.
Did you try %SEASON% and %EPISODE% in 0.27 and find that
they didn't work?
Did you try %SEASON% and %EPISODE% in 0.27 and find that
they didn't work?
Re: Add user job arguments for %season% and %episode%
No I did not try as it was not documented in the wiki I linked in my first post, plus I also did a through google to try and find if someone had written about it. After finding nothing and all scripts were using MySQL lookups to fetch the information I figured it was not added since it was easy to fetch from the database directly. I'll try it this evening and see if it works as that means my script will not need editing to have the password added in.
Re: Add user job arguments for %SEASON% and %EPISODE%
The Wiki got updated yesterday, just FYI.
Last edited by bill6502 on Wed Nov 04, 2015 11:37 pm, edited 1 time in total.
Re: Add user job arguments for %season% and %episode%
I can confirm it is working in 0.27 both %SEASON% and %EPISODE% work. Thanks for the help and also updating the wiki. Been using mythtv for over 6 years now and love it.