[mythtv-users] updated mythlink.sh

Joel Melohn jlmelohn at jcsm.com
Sun Oct 26 23:41:54 EST 2003


I made some additional updates and tweaks to mythlink.sh which I think makes
it much more useful for accessing the recorded programs from Windows.

Here is a summary of the changes that I made:

1.  Left the spaces in (Two lines can be uncommented if you want to have
spaces replaced by underlines) so that "Embryologist Ian Wilmut; Dolly, the
world's first cloned mammal" is the file name instead of
"Embryologist_Ian_Wilmut_-_Dolly__the_world_s_first_cloned_mammal"

2.  Replaced ":" with " -" in title and subtitle, so that "Kenny Chelsey:
Back where I come from" becomes "Kenny Chelsey: Back where I come from"

3.  Changed ";" with " -" in title and subtitle, so that "Embryologist Ian
Wilmut; Dolly, the world's first cloned mammal" becomes "Embryologist Ian
Wilmut - Dolly  the world s first cloned mammal"

4.  changed "/" with "-" in title and subtitle, so that "Garage/storage
space" becomes "Garage-storage space"

5.  When there is no "subtitle", use "description" instead of "subtitle" for
the file name.

6.  Sort the recordings so that when there are duplicates, the duplicates
are numbered in chronological order so that the highest number is the newest
recording.

Edward and None, Thanks again for your work on mythlink.sh.

Let me know what you think of these changes. My family has been using them
today and are very happy with the ease of use that it provides.

Joel


-----Original Message-----
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org]On Behalf Of Joel Melohn
Sent: Saturday, October 25, 2003 10:21 PM
To: Discussion about mythtv
Subject: RE: [mythtv-users] updated mythlink.sh


Well, I think that I have answered my own question. The attached patch seems
to provide numerical file names that are numbered in chronological order.
All I had to do is add the  "ORDERED BY starttime" clause to the select
statement as below:

/usr/bin/mysql -uroot  mythconverg -B --exec "select
chanid,starttime,endtime,title,subtitle from recorded ORDER BY starttime;"
>/tmp/mythlink.$$

Joel


-----Original Message-----
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org]On Behalf Of Joel Melohn
Sent: Saturday, October 25, 2003 9:40 PM
To: Discussion about mythtv
Subject: RE: [mythtv-users] updated mythlink.sh


One thing that I have encounterd with mythlink.sh is that if you have a set
of episodes of the same program that do not have a subtitle, you end up with
a subdirectory containing 1.nuv, 2.nuv, 3.nuv, etc. However, the files are
not numbered in chronological order. You could sort the directory by
creation date, but it would be helpful if the numeric names were in
chronological order.

Is there a simple way to enhance the script to do this.

Again, thanks for all you work on this script. It is very useful.

Joel

-----Original Message-----
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org]On Behalf Of Joel Melohn
Sent: Saturday, October 25, 2003 9:31 PM
To: Discussion about mythtv
Subject: RE: [mythtv-users] updated mythlink.sh


Edward and none,

Thanks for your work on mythlink.sh. It makes viewing recorded programs on
Windows XP much more usable.

I make a minor enhancement to the mythlink.sh script that replaces the ";"
with " -" which makes the subtitles more readable. For example, from one of
my wife's recordings, the subtitle:

Silver Beads; Ceramist; Stamping Products

without this patch becomes:

Silver_Beads__Ceramist__Stamping_Products

with the new patch, it becomes:

Silver_Beads_-_Ceramist_-_Stamping_Products

which I think is more readable.


The patch adds the single line:

$nfn =~ s/;/ -/g;

as follows:

@@ -26,6 +26,7 @@
                 my $nfn = "${subtitle}";
                 $nfn =~ s/ /_/g;
                 $nfn =~ s/&/+/g;
+                $nfn =~ s/;/ -/g;
                 $nfn =~ s/[^+0-9a-zA-Z_-]+/_/g;
 		my $nfn_orig = $nfn;
 		my $file_conflict = 1;


-----Original Message-----
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org]On Behalf Of Edward Rudd
Sent: Friday, October 24, 2003 11:39 PM
To: Discussion about mythtv
Subject: Re: [mythtv-users] updated mythlink.sh


OK here is an updated version of the mythlink.sh with your patch, and
various fixes to resolve name collisions. and "/"s in show titles..
Enjoy..

On Fri, 2003-10-24 at 21:56, None Spencer wrote:
> Hi all,
>
>   Here is a small patch for the mythlink.sh.  Instead of making all the
> links in one directory it will create a directory for each Show title with
> the actual link name being the subtitle.  So if you had this before:
>
> /path/you/use/09052100_Stargate_SG-1_Fallen
>
> you will end up with this:
>
> /path/you/use/Stargate SG-1/Fallen.nuv
>
> This makes it easier for my wife to find what she is looking for when she
is
> using windows and takes
> care of the file extensions.
>
> Enjoy.
>
> _________________________________________________________________
> Concerned that messages may bounce because your Hotmail account has
exceeded
> its 2MB storage limit? Get Hotmail Extra Storage!
> http://join.msn.com/?PAGE=features/es
>
> ______________________________________________________________________
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
--
Edward Rudd <eddie at omegaware.com>
Home Page <http://urkle.drip.ws/>

_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythlink.sh
Type: application/octet-stream
Size: 2196 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20031026/007a416a/mythlink-0001.obj


More information about the mythtv-users mailing list