<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><span style="font-family:Arial,Helvetica,sans-serif">On Thu, Mar 14, 2019 at 9:55 PM Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 14 Mar 2019 20:44:57 -0500, you wrote:<br>>On Thu, Mar 14, 2019 at 03:46:44PM -0500, Greg Oliver wrote:<br>
>> Hi,<br>
>> <br>
>> I was wondering if anyone has successfully setup MythTV to be a typee of<br>
>> multi-tenant setup.  2 cases:<br>
>> <br>
>> 1.  Same household, multiple viewers - same recording.  A good way to keep<br>
>> user 1 from deleting recordings before they are viewed by all - anyone ever<br>
>> come up with a design for this?<br>
><br>
>As Simon already mentioned, this has been discussed but nothing was<br>
>ever done.<br>
><br>
>> 2.  Different Households - 1 backend (case 1 still applies as well).<br>
>> Recording Groups can keep them separate with views, but still #1 would<br>
>> apply and step on each other here.<br>
><br>
>I actually have some experience with this.<br>
><br>
>We use recording groups to partition the recordings.  Recordings in<br>
>shared groups require coordination before they are deleted.  Recording<br>
>in groups that are exclusive can be freely deleted at will.<br>
><br>
>I personally patched the source code so that new, recording rules on<br>
>specififc frontends automatically default to a custom recording group.<br>
>While writing this reply, I realized I should change that to use a<br>
>hsot-specific setting so it could be used by others.<br>
><br>
>David<br>
><br>
>> Anyone have something similar working with good results?<br>
<br>
The thought I came up with was similar to this.  I make recordings on<br>
my system for my mother, and want to eventually automate how she gets<br>
access to them instead of my having to use mythexport/mythimport to<br>
copy them to her MythTV box.  I record things exclusively for her<br>
using a different recording group, and have a template set up so that<br>
I can easily use that to make a recording rule that puts things in<br>
that recording group.  However, I also have a second set of recording<br>
directories on each of my recording partitions, and the template tells<br>
mythbackend to record her recordings to those different directories.<br>
So in theory, when I get around to it, I can make a script that will<br>
automatically export the database entries from any new recording that<br>
is in one of those directories to her system, and delete it from mine.<br>
The recording file would stay in her recording directory on my system,<br>
and her system would have access to it via the network and would<br>
delete it from there when she has watched it.  That is the simple bit.<br>
<br>
Handling recordings that we both want to watch is more difficult.  I<br>
put them in a joint recording group, but the recording files go to my<br>
normal recording directories.  Here my idea was to use hard links from<br>
those recordings to the directory that my mother's MythTV box has<br>
network access to.  I would have my script export the database entries<br>
for these recordings, but also leave that data in my database.  She<br>
would be able to play these recordings from the hard link from her<br>
network accessible directory on my box.  Then when she deleted them,<br>
if I had not watched and deleted the recording, her delete would just<br>
delete the hard link and leave the recording for me to watch still. If<br>
I watched it first, then my delete of the recording would delete it<br>
from my recording directory, but leave the recording file still in her<br>
recording directory where it had been hard linked, and her delete<br>
would then delete the actual recording file.<br>
<br>
I have not actually got this working yet, but I think it should allow<br>
it all to work automatically.<br>
<br>
Trying to make multiple users work with only one database is even more<br>
difficult - without significant new code in MythTV, I can not see a<br>
way to make it work.  But if the frontend boxes that are being used<br>
for a multiuser setup are capable enough, they could each have a<br>
mythbackend setup with a dummy tuner, and that mythbackend could get<br>
the database exports from the main recording mythbackend and be used<br>
like my mother's system.  The secondary frontend boxes would still<br>
need to have a mythfrontend setup that talked to the main recording<br>
mythbackend to set up recordings from the Guide, but they would never<br>
play or delete recordings from anything except the mythfrontend that<br>
talked to the local mythbackend.<br>
<br>
As an alternative, if the other frontend boxes were capable of doing<br>
recordings themselves, but just lacked tuners (or access to the<br>
aerials), then it is possible to set up the tuners on the main MythTV<br>
box for remote access using SAT>IP via TVHeadend or minisatip.  I have<br>
done this with my DVB-S2 tuners.  SAT>IP manages the tuners so that if<br>
a tuner is already on the correct frequency for a newly requested<br>
channel, it will re-use the tuner to service the new request.  So<br>
multiple backends can be recording the same channels at the same time<br>
using the same physical tuners.  The big downside of SAT>IP is that<br>
MythTV does not understand the SAT>IP protocol, so it is incapable of<br>
doing a scan to find the channels that way.  So you have to set up all<br>
the SAT>IP channels via external software, and it has to put the URLs<br>
for the channels into the MythTV database (iptv_channel table and<br>
channel table) or create a playlist file that MythTV can use to load<br>
the channel data.  But this is possible to do - it is how I do my pay<br>
TV satellite channels from my DVB-S2 tuners.  MythTV is also unable to<br>
gather EIT EPG data from SAT>IP tuners, so that also needs to be done<br>
externally and loaded into MythTV using an xmltv file via<br>
mythfilldatabase.<br></blockquote><div><br></div><div class="gmail_default" style="font-family:monospace,monospace">I think I will just create a MythTV API proxy that handles it all..  I know that currently mythfrontend does not use the API, but the remotes I am concerned with all are..  That seems like the best way to move forward for me.  I will try something simple to make sure python can keep up without too much lag on playback before I get too deep into it..</div></div></div>