Scheduling recordings on MythTV 0.27

194 views
Skip to first unread message

Asko Soukka

unread,
Oct 20, 2013, 2:19:20 PM10/20/13
to torc-f...@googlegroups.com
Hi,

I'm amazed... I just tried Torc for the first time and it just worked with my Mythbuntu based MythTV 0.27. I can browse and stream recordings with my old iPad (2)  and MythTV is fun again. Thank you for such a great work!

Where I can see all the features that should work with MythTV?

E.g. should I be able to schedule new recordings? I can browse the program guide, select programs and try to schedule recording, but "Save" does nothing.

If this should work, how could I debug, what is (or is not) happening?

Cheers,
Asko

Robert McNamara

unread,
Oct 20, 2013, 2:27:00 PM10/20/13
to torc-f...@googlegroups.com
Hi Asko,

First off, thanks for your kind words about the app.  I'm so glad you're enjoying it!

In .27, there were major changes made to the Services API recording functionality which broke all previous clients.  I pushed a new version just before the release of .27 that rewrote the recording scheduling handling to also support .27.  At that time, recording scheduling worked with .27, but I'll admit I was only able to test it under the "normal" use cases, as there are so many variables it's nearly impossible to test all the permutations of recording options.  I had to make numerous bug reports/suggest multiple fixes to MythTV as just before .27 was out, recording rule APIs didn't work *at all*.  They had been rewritten and left totally untested, and broken in several ways!

The best and easiest way to see what's going on would be to start your backend with the -v upnp logging and attempt to schedule a recording with the app.  You'll see the URL called, and any error, which will give us a place to start looking.  You can post your logging here.  If there's a bug in the app (totally possible) I'll figure out what's going on and get a new version out ASAP.

I suppose it's also worth noting that if you happen to be running a pre-.27 version of MythTV, you'll want to get to the actual release version as you might be missing some of the fixes.

Thanks,

Robert



--
You received this message because you are subscribed to the Google Groups "Torc for iOS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torc-for-ios...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Robert McNamara

unread,
Oct 20, 2013, 3:24:07 PM10/20/13
to torc-f...@googlegroups.com
Hi Asko,

I just went into my .27 test VM and updated to current .27.  I confirmed that the current App Store version of the app is able to create recording rules of each type.  So, if you're on both newest .27 and newest Torc for iOS, let's definitely get those logs so that I can see how your rules differ from the ones I am creating and we'll get this figured out.

Thanks,

Robert

Asko Soukka

unread,
Oct 20, 2013, 11:39:37 PM10/20/13
to torc-f...@googlegroups.com
Hi Robert,

Thanks a lot for confirming that it should just work. I'll follow your advice and try to check my versions and get logs for what's happening and come back when I have something :)

Regards,
Asko

Asko Soukka

unread,
Oct 31, 2013, 9:02:32 AM10/31/13
to torc-f...@googlegroups.com
Hi Robert,

I finally followed your advice and run "mythbackend -v upnp".

It seems, that my Torc works for scheduling some programs, but not for scheduling others. When it works, I can schedule, re-schedule and remove scheduling for a program as many times as I want and everything works as expected. When it does not work, tapping "Save" does not send request to Myth TV at all.

Here's a log line from a successful scheduling:

2013-10-31 14:46:24.358097 I  ServiceHost::ProcessRequest: AddRecordSchedule : POST /Dvr/AddRecordSchedule?ChanId=1001&StartTime=2013-10-31T13:00:00&EndTime=2013-10-31T13:05:00&Title=Yle%20Uutiset&Subtitle=&Description=&Category=Uutiset&SeriesId=&ProgramId=&Station=Yle%20TV1&FindDay=5&FindTime=15:00:00&Season=0&Episode=0&Inetref=&Type=single&SearchType=None&RecPriority=0&PreferredInput=0&StartOffset=1&EndOffset=10&DupMethod=subtitleanddescription&DupIn=all&Filter=0&StorageGroup=Default&RecGroup=Default&RecProfile=Default&PlayGroup=Default&MaxEpisodes=0&AutoCommflag=true&AutoMetaLookup=true&Transcoder=0 HTTP/1.1

It see that program's title and description are included in the query string. Could it be that Torc silently fails to produce scheduling urls when there are special characters (e.g. ä or ö) in program's title or description?


Regards,
Asko


sunnuntai, 20. lokakuuta 2013 22.24.07 UTC+3 Robert McNamara (Torc Developer) kirjoitti:

Robert McNamara

unread,
Oct 31, 2013, 10:42:29 AM10/31/13
to torc-f...@googlegroups.com
Hi Asko,

Thanks, interesting results.  I don't think it's universally special characters that cause an issue-- I have a number of happy Danish, French, and German users of the app-- but I do think you're probably on the right track.  Can you respond with an example title and subtitle that aren't generating a recording rule so I can play around with debugging/trying to generate some test URLs with them?  I convert all URL strings to their ASCII equivalents, but it's possible that some particular character is problematic for the code I use to do that.

Thanks,

Robert

Asko Soukka

unread,
Oct 31, 2013, 12:08:13 PM10/31/13
to torc-f...@googlegroups.com
Hi Robert,

I saved a couple of program request from upnp log:

For this program Torc scheduling works:

<?xml version="1.0" encoding="UTF-8"?><RecRule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.11" serializerVersion="1.1"><Id>124</Id><ParentId>0</ParentId><Inactive>false</Inactive><Title>Yle Uutiset</Title><SubTitle></SubTitle><Description>Mukana talous ja kulttuuri.</Description><Season>0</Season><Episode>0</Episode><Category>Uutiset</Category><StartTime>2013-10-31T16:00:00Z</StartTime><EndTime>2013-10-31T16:22:00Z</EndTime><SeriesId></SeriesId><ProgramId></ProgramId><Inetref></Inetref><ChanId>1001</ChanId><CallSign>Yle TV1</CallSign><FindDay>5</FindDay><FindTime>18:00:00</FindTime><Type>Single Record</Type><SearchType>None</SearchType><RecPriority>0</RecPriority><PreferredInput>0</PreferredInput><StartOffset>1</StartOffset><EndOffset>10</EndOffset><DupMethod>Subtitle and Description</DupMethod><DupIn>All Recordings</DupIn><Filter>0</Filter><RecProfile>Default</RecProfile><RecGroup>Default</RecGroup><StorageGroup>Default</StorageGroup><PlayGroup>Default</PlayGroup><AutoExpire>false</AutoExpire><MaxEpisodes>0</MaxEpisodes><MaxNewest>false</MaxNewest><AutoCommflag>true</AutoCommflag><AutoTranscode>false</AutoTranscode><AutoMetaLookup>true</AutoMetaLookup><AutoUserJob1>false</AutoUserJob1><AutoUserJob2>false</AutoUserJob2><AutoUserJob3>false</AutoUserJob3><AutoUserJob4>false</AutoUserJob4><Transcoder>0</Transcoder><NextRecording></NextRecording><LastRecorded>2013-10-31T16:01:18Z</LastRecorded><LastDeleted></LastDeleted><AverageDelay>0</AverageDelay></RecRule>

for this program it fails:

<?xml version="1.0" encoding="UTF-8"?><RecRule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.11" serializerVersion="1.1"><Id>0</Id><ParentId>0</ParentId><Inactive>false</Inactive><Title>Yle Uutiset sää</Title><SubTitle></SubTitle><Description></Description><Season>0</Season><Episode>0</Episode><Category>Uutiset</Category><StartTime>2013-10-31T16:25:00Z</StartTime><EndTime>2013-10-31T16:30:00Z</EndTime><SeriesId></SeriesId><ProgramId></ProgramId><Inetref></Inetref><ChanId>1001</ChanId><CallSign>Yle TV1</CallSign><FindDay>5</FindDay><FindTime>18:25:00</FindTime><Type>Not Recording</Type><SearchType>None</SearchType><RecPriority>0</RecPriority><PreferredInput>0</PreferredInput><StartOffset>1</StartOffset><EndOffset>10</EndOffset><DupMethod>Subtitle and Description</DupMethod><DupIn>All Recordings</DupIn><Filter>0</Filter><RecProfile>Default</RecProfile><RecGroup>Default</RecGroup><StorageGroup>Default</StorageGroup><PlayGroup>Default</PlayGroup><AutoExpire>false</AutoExpire><MaxEpisodes>0</MaxEpisodes><MaxNewest>false</MaxNewest><AutoCommflag>true</AutoCommflag><AutoTranscode>false</AutoTranscode><AutoMetaLookup>true</AutoMetaLookup><AutoUserJob1>false</AutoUserJob1><AutoUserJob2>false</AutoUserJob2><AutoUserJob3>false</AutoUserJob3><AutoUserJob4>false</AutoUserJob4><Transcoder>0</Transcoder><NextRecording></NextRecording><LastRecorded></LastRecorded><LastDeleted></LastDeleted><AverageDelay>0</AverageDelay></RecRule>
The only meaningful difference, which I see, is the word "sää" in the latter.

I confirmed that text is really encoded in utf-8.

Regards,
Asko

Robert McNamara

unread,
Oct 31, 2013, 12:16:02 PM10/31/13
to torc-f...@googlegroups.com
Thanks, Asko-- I'll see what I can figure out.  I'll try to look at it this week.  If I can find the issue in my code and a solution, I'll get a new version out ASAP.

Robert

Robert McNamara

unread,
Oct 31, 2013, 10:18:01 PM10/31/13
to torc-f...@googlegroups.com
Hi Asko,

I have tested with this title and as you suspected, there appears to be an issue with percent-encoding this string using the Apple-provided API.  It's interesting, because back when I wrote this code, I tested with all manner of UTF-8 characters, umlauted "A"s included.  However, the app has been recompiled against numerous later versions of the iOS SDK since then, and I suspect somewhere along the way things stopped working as expected.  I have an alternate percent encoding mechanism that I'm testing with and looks good so far.  I need to bring up my .26 and .27 backends and test everything, but if all goes well, I'll try to get a new version submitted by the end of the weekend, which should hopefully be in your hands by the end of next week.

Thanks for working through the issue with me,

Robert

Robert McNamara

unread,
Nov 1, 2013, 12:31:39 AM11/1/13
to torc-f...@googlegroups.com
Alright, stayed up late to do my testing procedures and determined that everything looks good with .25, .26, and .27, including testing of Titles and Subtitles with UTF-8 characters in .27.  No crashes, and all rules successfully created.  I've submitted Version 1.11 to the App Store for review.  Since Apple always takes at least 5 business days for review, we're probably still looking at late next week.  If you can test and confirm that everything looks good once the new version is available to you, I'd appreciate it.

And, of course, as always, positive reviews (especially written ones) are appreciated if all is well :)

Robert

Asko Soukka

unread,
Nov 19, 2013, 12:59:26 PM11/19/13
to torc-f...@googlegroups.com
Hi Robert,

I'm sorry for not being able to try the new release sooner (I was a way for a week away from home when the new version became awailable).

Unfortunately, I still have issues: It looks like now the post data is encoded twice.

Whenever I hit "Save" on "Edit Recording Rule", I get "Connection Problem" and "Unable to connect to network or connection error. Check you configuration."

Mythbackend's -v pnp output looks like the following:

2013-11-19 19:52:37.759603 I  ExtractMethodFromURL(end) : AddRecordSchedule : /Dvr
2013-11-19 19:52:37.759630 I  ServiceHost::ProcessRequest: AddRecordSchedule : POST /Dvr/AddRecordSchedule%3FChanId%3D1002%26StartTime%3D2013-11-19T17:00:00%26EndTime%3D2013-11-19T17:10:00%26Title%3DYle%2520Uutiset%2520alueeltasi%26Subtitle%3D%26Description%3DAlueellisia%2520uutisia.%26Category%3DUutiset%26SeriesId%3D%26ProgramId%3D%26Station%3DYle%20TV2%26FindDay%3D3%26FindTime%3D19:00:00%26Season%3D0%26Episode%3D0%26Inetref%3D%26Type%3Dsingle%26SearchType%3DNone%26RecPriority%3D0%26PreferredInput%3D0%26StartOffset%3D1%26EndOffset%3D10%26DupMethod%3Dsubtitleanddescription%26DupIn%3Dall%26Filter%3D0%26StorageGroup%3DDefault%26RecGroup%3DDefault%26RecProfile%3DDefault%26PlayGroup%3DDefault%26MaxEpisodes%3D0%26AutoCommflag%3Dtrue%26AutoMetaLookup%3Dtrue%26Transcoder%3D0 HTTP/1.1

2013-11-19 19:52:37.761279 E  MethodInfo::Invoke - An Exception Occurred: Invalid title.
2013-11-19 19:52:37.761319 E  Invalid title.
2013-11-19 19:52:37.761366 I  HTTPRequest::SendResponse(xml/html) () :500 Internal Server Error -> 192.168.1.13: 1

and one with umlauts

2013-11-19 19:57:56.458149 I  ExtractMethodFromURL(end) : AddRecordSchedule : /Dvr
2013-11-19 19:57:56.458182 I  ServiceHost::ProcessRequest: AddRecordSchedule : POST /Dvr/AddRecordSchedule%3FChanId%3D1002%26StartTime%3D2013-11-19T16:48:00%26EndTime%3D2013-11-19T17:00:00%26Title%3DHupip%25C3%25A4tk%25C3%25A4t%2520%2528S%2529%26Subtitle%3D%26Description%3DHulvaton%2520kokoelma%2520tunnettujen%2520tv-ohjelmien%2520pilalle%2520menneit%25C3%25A4%2520kohtauksia%252C%2520jotka%2520todistavat%2520ett%25C3%25A4%2520vaikka%2520tuotantosuunnitelmat%2520olisivat%2520kuinka%2520vedenpit%25C3%25A4vi%25C3%25A4%252C%2520kaikki%2520voi%2520kuitenkin%2520lopulta%2520menn%25C3%25A4%2520p%25C3%25A4in%2520honkia.%26Category%3DViihde%26SeriesId%3D%26ProgramId%3D%26Station%3DYle%20TV2%26FindDay%3D3%26FindTime%3D18:48:00%26Season%3D0%26Episode%3D0%26Inetref%3D%26Type%3Dsingle%26SearchType%3DNone%26RecPriority%3D0%26PreferredInput%3D0%26StartOffset%3D1%26EndOffset%3D10%26DupMethod%3Dsubtitleanddescription%26DupIn%3Dall%26Filter%3D0%26StorageGroup%3DDefault%26RecGroup%3DDefault%26RecProfile%3DDefault%26PlayGroup%3DDefault%26MaxEpisodes%3D0%26AutoCommflag%3Dtrue%26AutoMetaLookup%3Dtrue%26Transcoder%3D0 HTTP/1.1

2013-11-19 19:57:56.459382 E  MethodInfo::Invoke - An Exception Occurred: Invalid title.
2013-11-19 19:57:56.459403 E  Invalid title.
2013-11-19 19:57:56.459432 I  HTTPRequest::SendResponse(xml/html) () :500 Internal Server Error -> 192.168.1.13: 1

Best Regards,
Asko


2013/11/1 Robert McNamara <robert....@gmail.com>
You received this message because you are subscribed to a topic in the Google Groups "Torc for iOS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torc-for-ios/CoIBcmkLS80/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torc-for-ios...@googlegroups.com.

Robert McNamara

unread,
Nov 19, 2013, 10:52:39 PM11/19/13
to torc-f...@googlegroups.com
Thanks, Asko.  I'll look at it again, I hope next weekend.  Sorry that this didn't do the trick for you.

Robert

Robert McNamara

unread,
Nov 24, 2013, 7:47:46 PM11/24/13
to torc-f...@googlegroups.com
Asko,

I've submitted another version that from my own testing seems to be okay on both .26 and .27 with programs with acute, grace, and umlauts in title, subtitle, and description.  Of course... that same testing worked on the last version.  Still, there are some changes so let's see how we do with this next one.  Thanks for hanging in there.

Robert

Robert McNamara

unread,
Nov 24, 2013, 7:48:08 PM11/24/13
to torc-f...@googlegroups.com
And that was meant to read "grave" rather than "grace," whops.

Robert McNamara

unread,
Dec 2, 2013, 10:23:33 PM12/2/13
to torc-f...@googlegroups.com
Hi Asko,

Just give me a heads up once you have a chance to try the 1.13 version, which is now available.  I'm crossing my fingers and hope this will help.

Robert

Asko Soukka

unread,
Dec 3, 2013, 12:16:46 AM12/3/13
to torc-f...@googlegroups.com, torc-f...@googlegroups.com
Hi Robert,

It seems that the issue is now fixed. Thanks for the hard work!

I managed to have another similar issue with one particular scheduling with a long description (I managed to schedule it, but started getting errors after that), but I'll look into that later if it happens again with a pattern.

Now I should look into the review part :)

Cheers,
Asko

Robert McNamara

unread,
Dec 3, 2013, 12:19:03 AM12/3/13
to torc-f...@googlegroups.com

On Mon, Dec 2, 2013 at 9:16 PM, Asko Soukka <data...@gmail.com> wrote:
It seems that the issue is now fixed. Thanks for the hard work!

Whew!  That's seriously a relief!

I suspect your long description issue probably is because HTTP URLs are only supposed to be < 2000 characters.  This is one of many reasons I haaaaate the new recording scheduling APIs introduced in version .27.  I can add a guard when the URL gets too long, though-- Look for that in the next version.

Best,

Robert
Reply all
Reply to author
Forward
0 new messages