Mailing List Archive

mythlink and case of filenames
Hello.

short question, is there a way to convince mythlink.pl to generate only
lowercase symbolic links?

reason for this question is that i have some bad guide data where they cant
decide if a show should be uppercase in beginning of the name only or if each
word should be upper case.
this creates multiple similar folders with only a difference in case and i
don't like it

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythlink and case of filenames [ In reply to ]
> On 25 Mar 2021, at 4:12 am, Torbjörn Jansson <torbjorn@jansson.tech> wrote:
>
> Hello.
>
> short question, is there a way to convince mythlink.pl to generate only lowercase symbolic links?
>
> reason for this question is that i have some bad guide data where they cant decide if a show should be uppercase in beginning of the name only or if each word should be upper case.
> this creates multiple similar folders with only a difference in case and i don't like it
>


Something like this (untested) hack:

% diff mythlink.pl.orig mythlink.pl
27a28
> our ($tolower);
54a56
> 'tolower' => \$tolower,
225a228,233
> --tolower
>
> Replace any capital letters in the link name with lower case.
>
> default: Mixed case, as per recording name in the database or guide
>
385a394,397
> # Work around bad guide data?
> if ($tolower) {
> $name = lc($name)
> }


should work?


--
Nigel Pearson, 02 9792 6998, 0408 66 44 35
nigel.pearson.au@gmail.com
Re: mythlink and case of filenames [ In reply to ]
On 2021-03-24 21:20, Nigel Pearson wrote:
>> On 25 Mar 2021, at 4:12 am, Torbjörn Jansson <torbjorn@jansson.tech> wrote:
>>
>> Hello.
>>
>> short question, is there a way to convince mythlink.pl to generate only lowercase symbolic links?
>>
>> reason for this question is that i have some bad guide data where they cant decide if a show should be uppercase in beginning of the name only or if each word should be upper case.
>> this creates multiple similar folders with only a difference in case and i don't like it
>>
>
>
> Something like this (untested) hack:
>
> % diff mythlink.pl.orig mythlink.pl
> 27a28
>> our ($tolower);
> 54a56
>> 'tolower' => \$tolower,
> 225a228,233
>> --tolower
>>
>> Replace any capital letters in the link name with lower case.
>>
>> default: Mixed case, as per recording name in the database or guide
>>
> 385a394,397
>> # Work around bad guide data?
>> if ($tolower) {
>> $name = lc($name)
>> }
>
>
> should work?
>
>

Tested it and it looks like it works.
Thanks.

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org