View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 15 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Feb 22, 2005 12:53 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Now that I've updated my backend to R5V10, the mythlink.sh script now fills the /myth/pretty folder with symlinks that have a date at the front of the name (nice), but no longer have an ".mpg" extender for my PVR-x50 recordings. I'd like to add this back for my setup, which only has .mpg recordings.

I found the thread that described how to modify the original mythlink.sh script:

http://mysettopbox.tv/phpBB2/viewtopic.php?t=498

but the new one doesn't have the same line 33 for editing to add the .mpg extender ($goodfile{$nfn .".mpg"} = 1)

Is anyone else seeing this, and does anyone with more scripting experience have an idea where I could add this? Thanks.


Top
 Profile  
 
PostPosted: Tue Feb 22, 2005 1:00 pm 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
ceenvee703 wrote:
Now that I've updated my backend to R5V10
Man are you ahead of the game. Can you tell me what improvements it has? That way I can improve it faster? Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 3:32 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
D'oh. :(

OK, R5A10...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 9:54 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Well my copy of the Hitchhikers Guide to the Galaxy which fell through a wormhole from the future describes R5V10 as not just the preimer, but indeed the ultimate PVR distro, and says that Cecil and Dale are regarded as living legends. ;-) It also says that the graphical installer is unbelievably brilliant and intuttive with an almost supernatural ability to detect and configure for almost any hardware. ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 10:22 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
But it's still really difficult to get the PVR350 TV out working. :lol: :( :shock:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 10:25 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
I did say "almost any hardware" and "living legends" rather than god-like superbeings. ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 10:31 pm 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
:D LOL


Top
 Profile  
 
PostPosted: Wed Feb 23, 2005 1:34 am 
Offline
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location: Sydney, Australia
ceenvee703 wrote:
I found the thread that described how to modify the original mythlink.sh script:

http://mysettopbox.tv/phpBB2/viewtopic.php?t=498

but the new one doesn't have the same line 33 for editing to add the .mpg extender ($goodfile{$nfn .".mpg"} = 1)


That thread has a new (modified) script at the top which contains 49 lines. Its line 33 looks like:

$goodfile{$nfn} = 1;

That is the line 33 to change, et c. Try replacing your current mythlink.sh with the one in that page, then do the edits mentioned later in the thread.

_________________
| Nigel Pearson, nigel.pearson.au@gmail.com
| "Things you own end up owning you" - Tyler, Fight Club


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 23, 2005 4:14 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Nigel, thanks for the help. I appreciate it.

I realize I could use that script, then make the changes described at the end of the thread. I'd prefer to make the changes to the current script, which seems to have changed quite a bit (it doesn't have the $goodfile variable in it at all).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 1:55 am 
Offline
Joined: Thu Sep 09, 2004 4:26 am
Posts: 77
Location: Sweden
I've updated from R4V4.1 to R5A12 and I added one row in the mythlink.sh

Code:
$nfn =  "$nfn.mpg";


before the line
Code:
print "Creating $nfn\n";


/Christian

_________________
Frontend/Backend: ShuttleX SN41G2, Xp2000+, 256MB, VGA to 1366x768 LCD TV
Terratec Cinergy 1200 DVB-C
DVD-BURNER: NEC ND3520 16x DL
Seagate Barracuda 7200.7 200GB
--
Frontend/Laptop: Compaq X1000, Pentium M 1.4Ghz, Unbuntu 6.10


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2005 4:02 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
That did the trick; thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 01, 2005 7:14 pm 
Hi,

I run R4V5 and made the changes to mythlink.sh as requested in the KnoppMyth wiki and discussed above. However, I believe there exists a bug in the perl script when there are files from a series that share the same name but are different in the description. An example of the error message is below.

Failed to create symlink /myth/pretty/Battlestar_Galactica-The_Lost_Warrior.mpg: File exists at -e line 39, <> line 49.

The show is the classic BSG and there are 2 versions of "The Lost Warrior" each with different descriptions.

I searched the forum on how to deal with near duplicates. Would you modify the script to deal with this special case such as add the record date to the filename?

Thank you.

Andrew Lynch


Top
  
 
 Post subject:
PostPosted: Mon May 02, 2005 5:46 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Andrew: the version of the script that comes with the R5 alpha does include the record date in the name... other than helping with conflicts like yours, it also results in lists being sorted chronologically.

When I updated to the most recent alpha, though, it wiped out the above changes to the script. Must remember to copy stuff like this to my home directory so it gets backed up...


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 03, 2005 4:37 pm 
Does the updated mythlink.sh work in R4? If so would you be so kind as to post the updated script so I could replace my mythlink.sh?

Thanks!

Andrew Lynch


Top
  
 
 Post subject:
PostPosted: Wed May 04, 2005 8:10 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Andrew: here you go. This includes the above modification to add ".mpg" extensions.

Code:
#!/bin/sh

# mythlink.sh - Symlinks mythtv files to more readable version in /var/lib/mythtv/pretty
# by Dale Gass

rm -f /tv/pretty/*
echo "Done RM"
mysql -uroot mythconverg -B --exec "select chanid,DATE_FORMAT(starttime,'%Y%m%d%H%i%s'),DATE_FORMAT(endtime,'%Y%m%d%H%i%s'),title,subtitle from recorded;" >/tmp/mythlink.$$
perl -w -e '
        my $mythpath= "/myth/tv";
        my $altpath= "/myth/pretty";
        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}_${end}.nuv";
                do { print "Skipping $mythpath/$ofn\n"; next } unless -e "$mythpath/$ofn";
                $start =~ /^....(........)/;
                my $nfn = "$1_${title}_${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");
                symlink "$mythpath/$ofn", "$altpath/$nfn" or die "Failed to create symlink $altpath/$nfn: $!";
        }
' /tmp/mythlink.$$
rm /tmp/mythlink.$$



Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu