Timer view enhancement for series recordings.
#1
First post ever! I know time is precious so I will try keep it to the point.

Respectfully requesting an enhancement to how Kodi PVR timers are displayed. I am proposing additional functions for Kodi PVR, and the Myth add-on to allow timers to display one unique item for each series recording, and a separate dialog to display the showings of that timer accessed by either a remote control context menu or a button in the timer settings.

Why: For example, if I schedule ABC - News to record daily, ABC2 - Playschool daily and ABC2 - Doctor Who - weekly, I currently see timers for every day of the ABC news, ABC2 – Playschool and weekly for Doctor Who up to about 14 days of EPG. Instead of 3 schedules.

It’s keeping me awake at night thinking how to change it. Obsessed with changing the view somehow, even if I could do it for personal use, but by looking at the code as a hobbyist C++ beginner, it is not possible for me at this time. I want to schedule recordings only via Kodi with a remote control, and not via Mythweb or Myth Frontend.

In keeping current functionality and not to break compatibility with other Kodi PVR add-ons, I would like the experienced gurus to consider the following (please);

Myth Add-on;
Add to the current function GetTimers() the option to display only unique timers which could be set in the add-on settings or maybe as a display option in the Confluence flyout menu on the left.
Add a function GetShowings() - Lists what is found to be recorded by the selected timer in EPG.

Kodi PVR;
Add a function possibly called AddOnGetShowings() to get a list of showings from the add-on on a selected timer. This would kick in for example, if the PVR add-on supports bSupportsTimerShowings.

Confluence skin;
Add a dialog window to display the showings on the selected timer using the remote control right click mapping/button within the timer settings. Only used if bSupportsTimerShowings.

Further – Not important;
My Home Theater – Kodi on Openelec, Myth backend running on LinHES, NAS to host media woken up by Kodi only when I need it, quality TV and surround sound system – ABSOLUTELY FANTASTIC!

Currently only have time/energy to watch TV for about an hour a week, mainly listen to music, but it would be wonderful to have this functionality for when the smoke clears for me.

I am just beginning to learn C++ in my later years and as a hobby used VB6 until .NET came out and I rebelled.

Also - A big thanks to Krustyreturns and those who helped with the PVR-WMC add-on. Sad to leave it behind, but now have all nice efficient purpose built Linux Openelec for Kodi & LinHES for MythTV backend.

Would love to have the privilege of contributing to great worthwhile projects such as Kodi in the future, and by then hopefully up to the inspirational standard of the Kodi engineers!

Thank you very much ladies & gentlemen of team Kodi!
Reply
#2
There are a few threads discussing series recording and related functions in the PVR development forum that you might want to checkout

http://forum.kodi.tv/forumdisplay.php?fid=136
Reply
#3
Hi RockerC,
Appreciate the lead and are deep into those threads now.

I thought I best post in this section first, and hope it be picked up/routed to the Kodi PVR team normally for consideration.

Will report back here with anything of significant interest to assist others if possible.

Cheers.
Reply
#4
Your post/thread probably still belong in PVR development forum? At least today most enhancement ideas regarding PVR look to be discuss there and not in the feature suggestion forum, and especially those in regards to improving usability and functionality accessible from inside Kodi's GUI.

http://forum.kodi.tv/showthread.php?tid=175135
http://forum.kodi.tv/showthread.php?tid=214469
http://forum.kodi.tv/showthread.php?tid=214551
http://forum.kodi.tv/showthread.php?tid=216776
http://forum.kodi.tv/showthread.php?tid=196022
Reply
#5
Posted references to more appropriate places now.

Improvements for pvr section: http://forum.kodi.tv/showthread.php?tid=...pid1959166
PVR Terminology: http://forum.kodi.tv/showthread.php?tid=...pid1959168


Thank you again RockerC.

Maybe there is some neat way to vote for a feature/change without spamming? If so, that might help out.

Cheers!
Reply
#6
Hi all,
Completed my Kodi add-on: Myth-PVR-Schedules.

“Alternate Timer view and editor for Myth PVR. A two pane view displays recording schedules and program showings per schedule. Click on a recording schedule to edit preferences such as a series recording, and on a program showing to disable it for resolving conflicts etc. Add the initial recording from the guide and then use Myth DVR Schedules to edit preferences.

My goal was to be able to do it all via a remote control in Kodi. Have a view of what is recorded per schedule as opposed to one big list of timers, and not have to use MythWeb for specific recording preferences, e.g. record and keep only the two latest news recordings. The “timer” settings in Kodi have to support all the different PVR’s, and I wanted a specialized view for MythTV.

Testing and feedback is welcome, and is needed for any updates prior to requesting language translations and submitting to the official XBMC.org repo.
You can get the add-on zip file and source code here: https://github.com/steve-carreck/Myth-PVR-Schedules

https://github.com/steve-carreck/Myth-PV...ules-1.png / Image
https://github.com/steve-carreck/Myth-PV...ules-2.png / Image

Notes;
You must have the Kodi Myth TV PVR add-on installed to watch and select a recording from the program guide. Myth-PVR-Schedules can then edit the recording to set a series recording and preferences. You will need to set the IP address of the MythTV Backend. A demo mode is available.

Being in Australia, I use EIT (EPG information embedded in theansmission) and set MythTV to grab as much EPG data as possible.

Use with Myth backend version .27 + Fixes and the Kodi Myth PVR add-on.

For simplicity and a quick setup of a compatible Myth backend, I use LinHES - “A Linux distribution that centers on MythTV.” (Current version: R8.3) You best install both the Backend and the Frontend to configure and test. OpenElec is my preference for hosting Kodi. All Linux Smile

This add-on uses the safe preferred Myth Services API method for manipulating recordings as opposed to accessing the database directly. The Myth Services API sanity checks the requests prior to making changes.

If there are any problems with the add-on, please switch on debug mode in the add-on settings, and provide the Kodi log file. Any Kodi/Python gurus are very welcome to suggest changes and submit GitHub requests. Note, I am a new GitHub user, so please bear with me getting started.
Reply
#7
I hope you are aware of the bigger changes for series recordings and timers that will be introduced with Kodi Jarvis? Is your add-on an addition to this or will it be (partially) obsolete, then?
Reply
#8
Hi Ksooo,

Hopefully with Kodi Jarvis, the add-on will be totally redundant, but it seems too far away quoting the Jarvis FAQ “keep in mind that a v16 (Jarvis) release is still far away into the future.”

The add-on was my motivation to learn Python, and Kodi add-ons. It does just what I need, albeit running in the programs section along with the PVR add-on.

I am hoping that Kodi Jarvis will do away with the current serial list of timers and allow the C++ PVR coders to use specialized dialogs to take advantage of each PVR backends capabilities. No disrespect, but the term timer for me is something I set on the radio to switch it off when I fall asleep. If you want something the way you want it, you have to do it your self, and thanks to Kodi developers for allowing it to be so.
Reply
#9
@DEBUG thanks for clarifying. How about giving Kodi nightly builds a try and to give some feedback on the new functionality?
Reply
#10
@DEBUG - like you I got fed up with waiting. Seems I found @ksooo's API 1.9.7 and you found python :-).

I downloaded your zip file and installed it on an RPi running OpenelElec 5.0.8 (ish) running it against my mythtv 0.27.4 fixes backend:
  • I see: "Error: Did not receive reply to command: 20 ANN Monitor TestPi 1" on the screen,
  • Then a list Recording Schedules appears (I have rather a lot of recording rules!)
  • If I scroll down to 'BBC News - BBC News' (a record daily rule) and press 'select' on my remote, I don't get anything on the 'Programs' side of the screen.
Using latest kodi master (compiled from source) on my core2 mythtv server box it seems to do a little more. I guess the PI isn't man enough (it was at 100% CPU when I turned on debugging).

On the core2 system when I browse the list of schedules, I see Programs appear in the pane on the RHS - which makes sense.
I press select on 'BBC News - BBC News' and get a list of 'Schedule settings'. Looks good.

This is where I start to get confused.
  • The user jobs, filter settings etc make sense. "This channel" needs a display of number/callsign to give context.
  • I see you have Storage group and I like the way this works, but I don't ever change it myself. I'm missing 'Recording Group' which I do use.
  • I guess the 'Single Record' and 'Series Record' options toggle between 'Record One' and 'Record All', but the picture is a bit more complex than this (weekly, daily, power search, manual etc...). Not sure how best to handle this in the format you're using.
  • When you push 'back' it takes you to the top of the list again - bit of a pain this - better if it took you back to the previously selected item.

Generally I can see this being an extremely useful stop gap until Jarvis comes along, possibly even living on as a 'power settings' tweaker once it does.

Janbar and I seem to have a similar philosophy: 'only show the mythtv settings we think are most useful', but maybe we differ slightly in what we consider useful and how best to present those options ;-)...

Your approach seems to include more of the other settings (like the user jobs) which I was thinking would be set up using a template (or templates?) which are applied to all new rules created via kodi. If these need tweaking later, I can see your tool being useful for some people even post jarvis if you don't want the hassle of mythweb to enable 'user job 3' for example.

A note of caution however: this version needs some performance optimizations if it is to be any use on lower powered boxes like an RPi. (And don't bother trying it with RPi Millhouse build #831 like I did first: looks like python support is broken!)

However, as Ksooo says, I (and probably Janbar as well) would be extremely interested in what you think of janbar's latest 'doityourself' offering of the mythtv client coupled with jarvis nightlies / roll your own from git. (see http://kodi.wiki/view/HOW-TO:Compile_Kodi_for_Linux and http://kodi.wiki/view/MythTV_PVR/BuildFromSource )
You could also take a look at some of the screenshots in my closed PRs: https://github.com/pulls?q=is%3Apr+autho...s%3Aclosed

As someone who was frustrated enough to make something themselves, your opinion on what should be in the pvr.mythtv client and how it should be presented will undoubtedly matter.
Reply
#11
(2015-09-01, 09:50)ksooo Wrote: @DEBUG thanks for clarifying. How about giving Kodi nightly builds a try and to give some feedback on the new functionality?

Thanks Ksooo,
You are on the ball. That would satisfy the inner geek, the want to contribute to FOSS and try new shiny things occasionally.
I need to do some investigation to find out where I can best fit in to do a proper job alongside family commitments. Nightly builds might require a daily response, but the monthly and special test builds could be just right. Just installed the Sept 1st Nightly in a Linux Mint VM to take a look.

PS: I see a post by metaron, so I guess I best prioritize making my add-on work, looking at your “API 1.9.7” and janbar's 'doityourself' - Which was unaware of, probably because I was beavering away on my own for about 6 Months.

Cheers.
Reply
#12
Hi Metaron,
First thanks to your comments, my wife is impressed and they will hopefully buy me more time :p And apologies in advance for a lot of detail, but for those who are Myth API and Python gurus, I would appreciate any tips.

In response to your findings;

• Error: Did not receive reply to command: 20 ANN Monitor TestPi 1"
• Then a list Recording Schedules appears (I have rather a lot of recording rules!)
• If I scroll down to 'BBC News - BBC News' - I don't get anything on the 'Programs' side of the screen.

Possible work-around;
If you want to edit the file myth_client.py” and search for “self.__command_timeout = 3.0” you could try increasing 3.0 to 4.0 etc. I would be interested to know where the cut-off point is.

Details;
Agree, performance improvements needed to run smooth on RPi.
From your clue “I have rather a lot of recording rules”, I am betting this relates to using XML as opposed to more efficient JSON (so I hear), to communicate with the backend. XML was much easier to use and debug at the time. So it could be network data being processed in the RPi causing a time out. The add-on subscribes to the server (ANN Monitor) for recording change events to update the display etc. It waits for a reply while asynchronously asking for all the recording rules.

I will try the following;
Three seconds is a long time so I want to avoid a greater time-out value.
Wait for the client to complete subscription to the server before going further.
Maybe limit to a page full of recording rules, rest for a second and get more.
Maybe bite the bullet and re code using JSON (almost a re-write) Ouch!


• The user jobs, filter settings etc make sense. "This channel" needs a display of number/callsign to give context.

Will add the channel name to the label to read as: "This channel (BBC News)"


• I see you have Storage group and I like the way this works, but I don't ever change it myself. I'm missing 'Recording Group' which I do use.

I would prefer 'Recording Group' too. (Kids, Fred, Bob, etc) I will swap it. Also, looks like the groups have to be created at the server or Myth Frontend. I could not find a way in MythWeb.


• I guess the 'Single Record' and 'Series Record' options toggle between 'Record One' and 'Record All', but the picture is a bit more complex than this (weekly, daily, power search, manual etc...). Not sure how best to handle this in the format you're using.

I used only “Single Record” and ‘Record All' for a series recording then filter by “This Series” and “This channel” to stop recording of the same thing on other channels. Other channels at possibly SD format too. All those other options were too complex to include and “Daily Record” was made obsolete with “Find Daily” “since version 76” I read somewhere in the MythTV web site, but I still see it in MythWeb, so I am confused.
I did not add the “find” options as I am used to selecting from the guide and have never used them (yet). I guess I could do later if others want it.

I am not 100% sure but if the same program is repeated on the same channel that day, it may be recorded twice. So I might have to include “This Time” Option. I had a lot of trouble using the other recording types via Myth Services API especially setting a particular showing not to record, it translated to an override. MythWeb and the standard Myth Frontend access the DB directly. I like the API, but could not find detailed documentation for its use. Using other recording types did not seem to allow the other options to be set. Either limitations or I just could not work it out. I used a template as the notes said to do and alter the values before posting back.


• When you push 'back' it takes you to the top of the list again - bit of a pain this - better if it took you back to the previously selected item.

This annoys me too, haha. I will look at that. I.e. set the focus back to the previous list item, not just the list.


• Janbar and I seem to have a similar philosophy (most useful settings)…

I wanted to divide the recording options into standard and advanced like Kodi, but lost the battle on where to draw the line! Dividing them would be simpler, look better and allow more options. Happy to do it if we got a consensus, can’t please them all though and making it user configurable would add even more options!


I will definitely take a look at Kasoo’s “API 1.9.7” and janbar's 'doityourself' - Which I was unaware of and humbly offer suggestions. First I think Kodi needs to allow specialized PVR dialogs/skins If not already.

I have a bit of work to do now. Will update with any significant progress. ETA, I cannot be sure.

Cheers.
Reply
#13
(2015-09-02, 10:04)DEBUG Wrote: • Error: Did not receive reply to command: 20 ANN Monitor TestPi 1"
• Then a list Recording Schedules appears (I have rather a lot of recording rules!)
• If I scroll down to 'BBC News - BBC News' - I don't get anything on the 'Programs' side of the screen.

Possible work-around;
If you want to edit the file myth_client.py” and search for “self.__command_timeout = 3.0” you could try increasing 3.0 to 4.0 etc. I would be interested to know where the cut-off point is.

I tried increasing it as high as 60, but still I get the same error (although a lot later).
Don't know if it's related but here are some symptoms which might help:
  • The list of recording schedules starts to appear between 5 and 20 seconds after the 'retrying' dialog disappears.
  • It is a considerable additonal time (> 17 seconds) before the 'selected' highlight appears around anything in the recording schedules list. You can press up/down and you get the 'click' noise , but nothing appears on screen.
  • Once the highlight appears, you can scroll up and down, but still nothing appears in the RHS window
  • Pressing 'select' on any of the selected options does nothing
  • Once the selected highlight appears, you can navigate to the 'Close' box and close the window.
Will try again on my RPi2 once openelec with kodi 'master' has finished compiling....

(2015-09-02, 10:04)DEBUG Wrote: I would prefer 'Recording Group' too. (Kids, Fred, Bob, etc) I will swap it. Also, looks like the groups have to be created at the server or Myth Frontend. I could not find a way in MythWeb.

I haven't come across a way to create recording groups (or recording templates) outside mythfrontend (or mysql!). As I regard these as as 'setup' features I'm not too bothered.

(2015-09-02, 10:04)DEBUG Wrote: I used only “Single Record” and ‘Record All' for a series recording then filter by “This Series” and “This channel” to stop recording of the same thing on other channels. Other channels at possibly SD format too. All those other options were too complex to include and “Daily Record” was made obsolete with “Find Daily” “since version 76” I read somewhere in the MythTV web site, but I still see it in MythWeb, so I am confused.
I did not add the “find” options as I am used to selecting from the guide and have never used them (yet). I guess I could do later if others want it.
Same here - I only ever used 'Record Once' for movies or 'Record All' for series. The UK Radio Times xml data feed I'm still using is good enough that I didn't get duplicates and the default 'Any Channel' allowed the backend to choose whichever channel it wanted (my HD channels have higher record priority, so it picks them first if it can).
I played with 'Recording Group' and 'auto expire' to sort and keep things forever (creating box sets for later viewing)

Since playing with the code, I can see the point to weekly/daily rules. I've also started using 'keep new discard old' and 'number of recordings'.

The situation regarding Daily/Weekly is complex, so this description might be slightly inaccurate, but here goes:
There are three settings which rule here: Record Type, Filter and Search Type.

Before 0.27, for Record Type we had:
  • Weekly Record
  • Daily Record
  • Find Weekly
  • Find Daily
  • Very minimal 'filter' support

After 0.27 and later we have:
  • Weekly Record
  • Daily Record
  • Filter 'This Day and Time' which loosely replaces 'Find Weekly'
  • Filter 'This Time' which loosely replaces 'Find Daily'

What does what?
  1. 'Weekly/Daily Record' with no filter and Search Type 'Title' will record the 1st showing matching that Title each day/each week.
  2. 'Weekly/Daily Record' with no filter and Search Type 'Manual' will record at the specified time each day/each week.
  3. 'Record All' with Filter 'This Day and Time' and Search Type 'none' will record something with a matching Title if it starts +/- 15 minutes either side of the recording rule 'start time, on the day of the week matching the recording rule start time.
  4. 'Record All' with Filter 'This Time' and Search Type 'none' will record something with a matching Title if it starts +/- 15 minutes either side of the recording rule 'start time.

I'm still not sure what 'Weekly/Daily Record' with Search Type 'None' actually does.
I've not played with 0.26 to find out what Find Weekly or Find Daily actually did.

As 0.26 won't allow a rule to be modified via the Services API (only delete and create), it seems a dead end, so I haven't investigated further. (I'm using a 0.27 backend)

(2015-09-02, 10:04)DEBUG Wrote: I am not 100% sure but if the same program is repeated on the same channel that day, it may be recorded twice. So I might have to include “This Time” Option. I had a lot of trouble using the other recording types via Myth Services API especially setting a particular showing not to record, it translated to an override. MythWeb and the standard Myth Frontend access the DB directly. I like the API, but could not find detailed documentation for its use. Using other recording types did not seem to allow the other options to be set. Either limitations or I just could not work it out. I used a template as the notes said to do and alter the values before posting back.

The 'duplicate matching' works quite well. Personally I'd forgo the 'manual' approach and just use Duplicates: None/Subtitle/Description/Subtitle+Description/Subtitle then Description.
By default this matches against anything ever recorded, including expired stuff. I changed my default template to ignore 'previously recorded' in the match, so now it re-records expired/deleted stuff if it is re-shown provided I haven't also deleted the rule. Not a purest mythtv approach, but works well enough for my needs.

Regarding the API behaviour I agree it isn't that well documented and there's a lot of 'suck it and see'. Maybe I ought to take the time to update the documentation on the mythtv wiki with what I found out...


(2015-09-02, 10:04)DEBUG Wrote: I wanted to divide the recording options into standard and advanced like Kodi, but lost the battle on where to draw the line! Dividing them would be simpler, look better and allow more options. Happy to do it if we got a consensus, can’t please them all though and making it user configurable would add even more options!

I agree this is a potential minefield. I'd go with what you (and the wife!) want to use regularly for 'standard' and stick anything else in 'advanced 1/2/3 ...'. At least that way it suits one user and you'll probably get 70% of what others want.

(2015-09-02, 10:04)DEBUG Wrote: I will definitely take a look at Kasoo’s “API 1.9.7” and janbar's 'doityourself' - Which I was unaware of and humbly offer suggestions. First I think Kodi needs to allow specialized PVR dialogs/skins If not already.

'Specialized dialogs' was what I was thinking initially, but I'm beginning to think we might get away without them for 'standard' users. Mythtv has a lot of settings which are very powerful, but not necessary 95% of the time and the rest of the time just provide clutter imo. The mythfrontend UI does a good job of hiding the clutter while still providing it when you need it, but this requires it to be very specialized.

I don't think Kodi will ever be able to do that for mythtv as it has to support a myriad of other PVR backends as well.
Kodi does support custom dialogs, but they have other problems (skinning I guess among others). I haven't played with them myself. I know that the pvr.wmc maintainer has just enthusiastically embraced the new series recording API and ditched his custom dialogs. I'm focussing my efforts on improving the PVR API ... :-)

Best of luck!
Reply
#14
Thanks Metaron,
Excellent info. Regarding the recording types & filters.

My plan so far;
• Get RPi working ok as priority, which means it should work better on beefier systems.
• Have a look at Kasoo’s “API 1.9.7” and Janbar's 'doityourself' for inspiration on better methods before I jump in to change.
• Change the connection detection – Wait and proceed if subscribed to server (ANN Monitor)
• Load one rec rule at a time and display – Lower RAM usage, small chunks of network work. Hopefully some distraction as the list grows and/or a progress bar (Inch Worm of contemplation!) To make the initialization not feel so long. Currently it grabs all the data at once, bad & too ambitious.
• Add the channel name to the label to read like: "This channel (BBC News)"
• Swap’ Storage group’ for 'Recording Group'
• Set the focus back to the previous list item after back from options.
• Depending on time/progress, split options at user jobs, like advanced 1, 2, and 3.

No ETA, but I can start chipping away now. Hope to get this out of the way asap so I can get into Ksooo & Janbar’s work.

Cheers.
Reply
#15
Just tested on my RPi2 running a homebrew OpenElec 6.0 devel with latest kodi. The symptoms are the same as for the RPi, except everything happens slightly faster.

Just a thought this, but possibly it's something to do with the version of python installed by OpenElec?

On my gentoo box (which works):
blackbox ~ $ python --version
Python 2.7.9

On my openelec installation (which doesn't):
Pi2:~ # python --version
Python 2.7.3
Reply

Logout Mark Read Team Forum Stats Members Help
Timer view enhancement for series recordings.0