Author Topic: UpdateMedia scanning LiveTv files  (Read 3991 times)

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
UpdateMedia scanning LiveTv files
« on: March 14, 2009, 05:50:46 am »
Why is UpdateMedia scanning and tagging the LiveTv recordings? Everything I watch, including all channels I scan, are updated and tagged by UpdateMedia. Then there are a ton of orphaned .id3 files and sql data once those recordings are expired. To top it off, many but not all of the live tv shows are viewed in my video list (with LiveTv: prefix), and that is very annoying.

Did I do something wrong, or is that how it was designed to work? Hopefully I did something wrong, and can correct it.

I have searched the forums and wiki, and can find nothing that really addresses the issue.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: UpdateMedia scanning LiveTv files
« Reply #1 on: March 14, 2009, 06:32:37 am »
It is unfortunately a side-effect of the fact that under 0710, both live and recorded buffers show up in the same place.

I am working on a solution utilizing the storage groups in the mythtv provided 0810, but I have not come up with anything yet.

-Thom

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: UpdateMedia scanning LiveTv files
« Reply #2 on: March 14, 2009, 04:07:44 pm »
Since all of the livetv shows are in the specific numbered format, could UpdateMedia ignore files that meet that regex? Then add a line to SaveMythRecording.sh that would create a file with a .scan suffix. UpdateMedia would only scan files with that .scan suffix.

So a saved recording is named 1171_20090309220000.mpg. SaveMythRecording.sh touches a file 1171_20090309220000.mpg.scan. UpdateMedia then forcefully scans 1171_20090309220000.mpg. Works like folderlock but in reverse.

Another way to make this work, and what I was actually going to try myself, is to add a dir "live" under tv_shows_1. Configure myth to place all live buffer and saved recordings there. Configure SaveMythRecording.sh to move the file ../ and touch a dummy file in the live dir so myth doesn't complain when it tries to expire the recording. The recorded show can stick around until the user decides to delete it, rather than having to worry about expiration. This would also solve the problem where recordings can't be deleted from mythweb when the user deletes them in LinuxMCE.

What do you think?

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: UpdateMedia scanning LiveTv files
« Reply #3 on: March 14, 2009, 04:18:56 pm »
To take the first suggestion a step further. Have UpdateMedia load an ExcludeRegEx.cfg file. That way we can add our own RegEx that UpdateMedia should ignore. I would love that!!

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: UpdateMedia scanning LiveTv files
« Reply #4 on: March 14, 2009, 04:53:24 pm »
Here is my new SaveMythRecording.sh
Code: [Select]
num=`echo $3 | tr -s "/" " " | wc -w`
dir=`echo $3 | cut -f1-$num -d/`

cp $3/$4 $dir/$4
cat /dev/null > $3/$4

echo "$(date) $0-$1-$2-$dir-$4" >> /var/log/pluto/donerecording.log
/usr/pluto/bin/MessageSend dcerouter 0 -1001 2 69 29 "$1" 57 "$2" 35 "$dir/$4"

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: UpdateMedia scanning LiveTv files
« Reply #5 on: March 14, 2009, 05:51:20 pm »
It worked! I changed the mythtv recording path to /home/public/data/videos/tv_shows_1/live and scheduled a recording. I love the result, but I wonder if something will change the path back to /home/public/data/videos/tv_shows_1 at some point. I remember reading that something out there configures myth automatically at some point. Can anyone elaborate on that.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: UpdateMedia scanning LiveTv files
« Reply #6 on: March 14, 2009, 06:05:07 pm »
yes, the system will reconfigure itself after each router reload.

As for your script, it will not work once 0810 is available because the storage system in mythtv has changed considerably. I am working on a solution.

-Thom

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: UpdateMedia scanning LiveTv files
« Reply #7 on: March 14, 2009, 06:47:55 pm »
Can you tell me where can I change the reconfigure script? I would like to use this workaround until 0810.

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: UpdateMedia scanning LiveTv files
« Reply #8 on: March 15, 2009, 02:22:42 pm »
Does anyone know how I can stop the mythtv auto reconfiguration? In the meantime, I changed the script to allow for the reconfig. I currently change the recording path manually every time the router restarts.
Code: [Select]
#!/bin/bash
num=`echo $3 | tr -s "/" " " | wc -w`
if [ "$num" -gt "5" ]
then
dir=`echo $3 | cut -f1-5 -d/`
cp $3/$4 $dir/$4
cat /dev/null > $3/$4
echo "$(date) $0-$1-$2-$dir-$4" >> /var/log/pluto/donerecording.log
/usr/pluto/bin/MessageSend dcerouter 0 -1001 2 69 29 "$1" 57 "$2" 35 "$dir/$4"
else
echo "$(date) $0-$1-$2-$3-$4" >> /var/log/pluto/donerecording.log
/usr/pluto/bin/MessageSend dcerouter 0 -1001 2 69 29 "$1" 57 "$2" 35 "$3/$4"
fi

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: UpdateMedia scanning LiveTv files
« Reply #9 on: March 20, 2009, 02:53:23 pm »
For anyone else who wants a workaround for LiveTV recordings, I got it squared away and it works well.

http://wiki.linuxmce.org/index.php/MythTv:_Don%27t_scan_live_tv