User Tools

Site Tools


myth_tv_homebrew_project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
myth_tv_homebrew_project [2007/09/27 01:04] davidmyth_tv_homebrew_project [2009/03/01 15:42] (current) david
Line 444: Line 444:
   * Get LIRCD up and running BEFORE you compile MPlayer as it will autodetect it if you have it up when you compile MPlayer.  (So the remote will work while watching Video, not Recordings)   * Get LIRCD up and running BEFORE you compile MPlayer as it will autodetect it if you have it up when you compile MPlayer.  (So the remote will work while watching Video, not Recordings)
   * EDIT /etc/rc.d/rc.mysql "SKIP NETWORKING TRUE!" is the default in Slackware 10.2 !?!?!?! argh.... 1 hour wasted figuring out why I couldn't connect to the database remotely!?   * EDIT /etc/rc.d/rc.mysql "SKIP NETWORKING TRUE!" is the default in Slackware 10.2 !?!?!?! argh.... 1 hour wasted figuring out why I couldn't connect to the database remotely!?
 +
 +===== Human Readable File Names =====
 +
 +  * Note this is specific to Mythbuntu
 +
 +  - Create a directory under recordings that you can write to:  <code>
 +sudo mkdir /var/lib/mythtv/recordings/links
 +sudo chgroup video /var/lib/mythtv/recordings/links
 +sudo chmod 775 /var/lib/mythtv/recordings/links
 +</code>
 +  - Use the **mythlink.sh** scripts with a couple modifications to make the directories and links to your files whenever you need them.
 +
 +<code>
 +
 +#!/bin/sh
 +
 +# mythlink.sh - Symlinks mythtv files to more readable versions
 +# by Dale Gass modified by Jacob Stoner
 +
 +if [ ! -d /var/lib/mythtv/recordings/links ]; then mkdir /var/lib/mythtv/recordings/links; fi
 +rm -R -f /var/lib/mythtv/recordings/links/*
 +
 +echo "Done RM"
 +mysql -umythtv -pYOURPASSWORDGOESHERE  mythconverg -B --exec "select chanid,starttime,endtime,title,subtitle from recorded;" >/tmp/mythlink.$$
 +perl -w -e '
 +        my $mythpath= "/var/lib/mythtv/recordings";
 +        my $altpath= "/var/lib/mythtv/recordings/links";
 +        if (!-d $altpath) {
 +                mkdir $altpath or die "Failed to make directory: $altpath\n";
 +        }
 +        <>;
 +        while (<>) {
 +                chomp;
 +                my ($chanid,$start,$end,$title,$subtitle) = split /\t/;
 +                $start =~ s/[^0-9]//g;
 +                $end =~ s/[^0-9]//g;
 +                $subtitle = "" if(!defined $subtitle);
 +                my $ofn = "${chanid}_${start}.mpg";
 +                do { print "Skipping $mythpath/$ofn\n"; next } unless -e "$mythpath/$ofn";
 +                $start =~ /^....(........)/;
 +                #my $nfn = "$1_${title}_${subtitle}";
 +                my $nfn = "${title}";
 +                if ($subtitle) {$nfn="${nfn}_${subtitle}"}
 +                $nfn =~ s/ /_/g;
 +                $nfn =~ s/&/+/g;
 +                $nfn =~ s/[^+0-9a-zA-Z_-]+/_/g;
 +                $nfn = "${nfn}.mpg";
 +                print "Creating $nfn\n";
 +                unlink "$altpath/$nfn" if(-e "$altpath/$nfn");
 +                mkdir "$altpath/$title";
 +                symlink "$mythpath/$ofn", "$altpath/$title/$nfn" or print "Failed to create symlink $altpath/$nfn: $!";
 +        }
 +' /tmp/mythlink.$$
 +rm /tmp/mythlink.$$
 +</code>
  
 ====== Support Configurations ====== ====== Support Configurations ======
myth_tv_homebrew_project.1190855054.txt.gz · Last modified: 2009/03/01 14:44 (external edit)