[mythtv-users] HDHR + Over the Air + Sony Network Media Player + Buffalo NAS

Jeremy Jones jeremy.dwain.jones at gmail.com
Wed Dec 21 13:30:55 UTC 2011


On Tue, Dec 20, 2011 at 10:21 PM, Jeff Tucker <jefftucker at gmail.com> wrote:

> On Fri, Dec 16, 2011 at 11:38 AM, Craig Treleaven <ctreleaven at cogeco.ca>
> wrote:****
>
> At 10:53 AM -0600 12/16/11, Jeremy Jones wrote:****
>
> On Thu, Dec 15, 2011 at 9:54 PM, Jeff Tucker <jefftucker at gmail.com>
> wrote: ****
>
> ** **
>
> So basically I recorded a TV episode and once it completed its recording I
> ran mythlink.pl to create the organized/readable links. MiniDLNA is
> running so I assumed that it would have updated itself with the newest
> folders/videos.****
>
> ** **
>
> Yes, you can set up a user job to run mythlink for that recording only.  I
> also have a cron job setup to run mythlink nightly, so that I can clean up
> the links to deleted recordings.****
>
> ** **
>
> [...] The cron job is necessary though, otherwise you will end up with a
> bunch of links to files that don't exist.****
>
> ** **
>
> Minor point, but my strategy is to refresh ALL the links every time a
> recording ends.  Only takes a few seconds and I've never seen any
> noticeable impact on either backend or frontend activities on that
> machine.  Maybe if you have multiple hundreds of recordings, it would be
> different.****
>
> ** **
>
> ** **
>
> Craig is right.  What I should have said was:****
>
> You can't just run mythlink as a user job inputting the recording to add.
>  At some point you will need to run it with a full rescan.   I originally
> had my system setup that way, but after re-looking at it, I am not running
> that userjob at all.   I guess after a while I just forgot about ticking
> the userjob to run mithlink, and I just didn't realize it because I always
> had a backlog. What is happening is that the cron job runs nightly and it
> executes this script:****
>
> ------------------****
>
> #!/bin/bash****
>
> /usr/share/doc/mythtv-backend/contrib/user_jobs/mythlink.pl --link
> /2TB_HDD_1/videos/recordedTV --underscore --format %T/%oY-%om-%od_%S****
>
> ------------------****
>
> ** **
>
> I suppose one could execute that same script as a user job and refresh
> them all at once.  I also have this script that I wrote back when I was
> first setting everything up. It runs mythlink via the script above and then
> waits a given time before restarting minidlna.  One problem I had was that
> minidlna needed to run as root.  Anyway, the script is below.  Hope some of
> this helps.****
>
> ** **
>
> Jeremy****
>
> ** **
>
> ** **
>
> ----------------------------------****
>
> #/usr/share/doc/mythtv-backend/contrib/user_jobs/mythlink.pl --link
> /2TB_HDD_1/videos/mythtv --underscore --format %T/%T%-%S%-%Y-%m-%d****
>
> /home/jeremy/runmythlink****
>
> echo -n 'Creating Symbolic links for Recorded TV  - Wait:  '****
>
> # Give mythlink time to finish****
>
> cycleTime=1****
>
> timeToWait=10****
>
> strlen=${#timeToWait}****
>
> until [ $timeToWait -lt 1 ];do****
>
> #  echo****
>
> #  echo  "the backspaces should be: ${#timeToWait}"****
>
> ##  echo "The time will be: $timeToWait"****
>
>   echo -n "$timeToWait"****
>
>   sleep $cycleTime****
>
>   # echo ${#timeToWait}****
>
>   while [ $strlen -gt 0 ];do****
>
>     echo -ne "\b"****
>
>     echo -ne " "****
>
>     echo -ne "\b"****
>
>     let strlen=strlen-=1****
>
>   done****
>
>   #if [ $timeToWait -lt 11 ] ; then****
>
>   #  echo -ne " "****
>
>   #fi****
>
>   let timeToWait=timeToWait-=$cycleTime****
>
>   let strlen=${#timeToWait}****
>
> #echo****
>
> #echo $strlen****
>
>  done****
>
> echo****
>
> ** **
>
> #restart minidlna and force a rescan****
>
> gksudo /etc/init.d/minidlna restart****
>
> ------------------------------------------------------------****
>
> ** **
>
> Jeremy,****
>
> ** **
>
> I have created the cronjob similar to what you have given me however
> minidlna doesn't correctly update/rescan the links created from mythtvlink.
>

Check the paths in the minidlna.conf file to make sure you didn't restore
an unedited one, or use my paths by mistake.  Also there could be
permission issues.  I am running miniDLNA as root, but I'm not sure I have
to.


> When I try to view the recordings from the media player it doesn't have
> any information. I basically lost the linked folders and .mpg files in
> minidlna, they still exist in the link from mythtvlink.****
>
> ** **
>
> Two things happened: I created the cronjob and it started running every 30
> minutes. I deleted some old recordings using MythWeb and then all of a
> sudden I couldn't see the recordings that were left.****
>
> **
>
**
>
> I tried uninstalling and re-installing minidlna but that didn't do
> anything to help matters.
>
****
>
> **
>
Did you try restarting the network player? Or checking the network
connection? The issue may not be server side.


> **
>
> I have even tried to force-restart minidlna but it didn't clear anything
> up.****
>
> ** **
>
> I was reading about gksudo and sudo and wonder if I should be using sudo
> since gksudo is only for opening GUI applications without having to use a
> terminal session. IE. from an icon on the workspace/desktop.
>

I had gksudo in that file because I was running it as a script without
opening a terminal.  Executing it that way you will not get a prompt for
sudo.  gksudo will prompt anyway.

Also I noticed above that my line for restarting miniDLNA was using init.d.
 Are you able to actually restart miniDLNA?  If not figuring out how to do
that will help a lot in troubleshooting.



****
>
> ** **
>
> Please pass along anything you think might help me recover my minidlna
> content.****
>
> **
>

Don't worry, the content is all in mythtv.  All miniDLNA is doing is
passing out a roadmap telling the network player how to retrieve it.


> **
>


Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20111221/99b2410d/attachment.html 


More information about the mythtv-users mailing list