[mythtv-users] Plex integration

Michael mythtv at blandford.net
Sat Jan 2 22:12:47 UTC 2016


On 01/02/2016 06:44 AM, Michael T. Dean wrote:
> On 12/30/2015 02:21 PM, Matt Emmott wrote:
>> On Mon, Dec 14, 2015 at 6:46 AM, Michael T. Dean 
>> <mtdean at thirdcontact.com>
>> wrote:
>>
>>> On 12/07/2015 06:59 AM, Matt Emmott wrote:
>>>
>>>> One important piece is that the symlinks you create don't 
>>>> automatically
>>>> delete when the recordings go away, so Plex thinks they're still in 
>>>> your
>>>> library and you get a lot of file not found errors.
>>>>
>>> https://www.mythtv.org/wiki/Mythlink.pl#Usage
>>> -----
>>> Note that when specifying |--filename| or |--chanid| and |--starttime|,
>>> deletion of old symlinks is suppressed. Therefore, anyone using this 
>>> script
>>> in a user job or with the event system should still run the script
>>> occasionally without the |--filename| or |--chanid| and |--starttime|
>>> arguments to allow removal of links that referred to recordings since
>>> deleted. Alternatively, you may use a script triggered on "Recording
>>> deleted" and "Recording expired" to remove the specific link when its
>>> recording is removed.
>>> -----
>>>
>>> So, if you use the alternate option, you could have the link deleted
>>> immediately upon recording deletion/expiration, so that there's never a
>>> link to a non-existent recording.
>>>
>>> Mike
>>
>> Right but the problem with that is that it recreates all the symlinks 
>> from
>> scratch, which creates all new timestamps. Then Plex has to reindex
>> everything, which takes some time (I have 4TB of recordings). More
>> importantly though browsing shows by most recently added doesn't work
>> because they all have the same file creation timestamp.
>
> No, as I said, the alternate option.  To quote, again:
> -----
> Alternatively, you may use a script triggered on "Recording
> deleted" and "Recording expired" to remove the specific link when its
> recording is removed.
> ---


The problem with this method is if you have a show that doesn't have 
good season or episode data then you may not get a link created.

For example, I record a show called Living Alaska.  It regularly doesn't 
populate season, episode, or even title data.

If I run it as triggered, then I just get something like:
Living Alaska - SE - Untiltled.mpg

for the first show.  When the next showing happens, it tries to make the 
same name which conflicts with the previous copy.  As a result, it 
doesn't create any link.  Now I have a show that isn't accessible via plex.

However, if I run it as a stand alone job once a day, I get

Living Alaska - SE - Untitled.2.mpg
Living Alaska - SE - Untitled.3.mpg
Living Alaska - SE - Untitled.4.mpg
Living Alaska - SE - Untitled.5.mpg
Living Alaska - SE - Untitled.6.mpg
Living Alaska - SE - Untitled.7.mpg
Living Alaska - SE - Untitled.mpg
etc

This obviously has the issue of having updated link dates impacting plex.

I could add the recording date or some other info to the recording to 
make it unique, but that then confuses plex.

Michael





More information about the mythtv-users mailing list