Mythlink.pl

For discussion of topics specific to MythTV on linux
Post Reply
mgranger
Junior
Posts: 27
Joined: Mon Jul 31, 2017 9:49 pm
United States of America

Mythlink.pl

Post by mgranger » Mon Jan 29, 2018 8:24 pm

So I am not sure what happened because at one time I had this all setup the way I wanted it but one days I think my backend crashed and missed recording some shows and so I had to restart the backend. So my issue is all of my recordings go into a folder then I use mythlink.pl to rename the episodes so that it is Show - SXXEXX - Name of Episode. For some reason I am always getting S00E00. It never actually puts the correct Season number or Episode number. I know I put the extra info into mythlink.pl because I am getting the 00 and but for some reason this information is never pulled.

I would appreciate any help.

User avatar
pgbennett
Developer
Posts: 321
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Mythlink.pl

Post by pgbennett » Thu Feb 01, 2018 3:20 pm

First question is whether the season and episode are in the database, which you can see from the frontend.

Here is what I use and it works fine. Perhaps you can compare yours and figure out the error

Code: Select all

if [[ "$param" == airdate ]] ; then
    # By Air Date
    rm -rf "$LINKSDIR"/airdate
    /usr/share/doc/mythtv-backend/contrib/user_jobs/mythlink.pl \
      --dest "$LINKSDIR/airdate" --format "%U/%T/%y%m%d-%H%i %oy%om%od S%ssE%ep %S"
else
    # By Title with orig date
    rm -rf "$LINKSDIR"/origdate
    /usr/share/doc/mythtv-backend/contrib/user_jobs/mythlink.pl \
      --link "$LINKSDIR/origdate" --format "%U/%T/%oy%om%od S%ssE%ep %S"
fi

mgranger
Junior
Posts: 27
Joined: Mon Jul 31, 2017 9:49 pm
United States of America

Re: Mythlink.pl

Post by mgranger » Thu Feb 01, 2018 5:10 pm

Mine looks similar where mine looks like this.

Code: Select all

/usr/share/doc/mythtv-backend/contrib/user_jobs/mythlink.pl --link Locationoffiles --format '%T - S%qs2E%qe2 - %S'
from this a show would look like the following

Title of Show - S00E00 - Episode Name

I used to get something more like this before something changed just not sure how to get it back to the way it was:

Title of Show - S01E10 - Episode Name

User avatar
pgbennett
Developer
Posts: 321
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Mythlink.pl

Post by pgbennett » Thu Feb 01, 2018 6:33 pm

Notice I have S%ssE%ep whereas you have S%qsE%qe2 .

If you look in the mythlink.pl file you will see the help text as follows:

Code: Select all

    \%ss  = Season (leading zero)
    \%ep  = Episode (leading zero)
So %ss and %ep are the correct things for the current version of mythlink.pl. I don't know why you have %qs and %qe2

mgranger
Junior
Posts: 27
Joined: Mon Jul 31, 2017 9:49 pm
United States of America

Re: Mythlink.pl

Post by mgranger » Thu Feb 01, 2018 6:40 pm

Ok I noticed that but wasn't sure. I did look through my mythlink.pl file and my new mythlink file had the %ss and %ep so I changed mine. I think my mythlink.pl file was updated and that is probably why mine got messed up. I fixed my file and we will see what happens. I will update when I find out.

Thanks for the help.

mgranger
Junior
Posts: 27
Joined: Mon Jul 31, 2017 9:49 pm
United States of America

Re: Mythlink.pl

Post by mgranger » Fri Feb 02, 2018 12:39 pm

So I tried it with using %ss and %ep and now i am getting nothing so my file name now looks like the following:

Title of Show - SE - Episode Name

mgranger
Junior
Posts: 27
Joined: Mon Jul 31, 2017 9:49 pm
United States of America

Re: Mythlink.pl

Post by mgranger » Fri Feb 02, 2018 5:31 pm

I assume this means that the Season and Episode Number are not getting stored in the Database for some reason

User avatar
pgbennett
Developer
Posts: 321
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Mythlink.pl

Post by pgbennett » Fri Feb 02, 2018 5:46 pm

Have a look on the frontend to see if season and episode are there. Not all themes may show them, but Steppes shows season and episode next to each show in the recorded list if they are in the database.

Season and episode are normally obtained by running metadata lookup on each show. They can also be obtained from the listings if they are provided. I use Schedules Direct with tv_grab_zz_sdjson_sqlite. With this setup the season and episode are provided so that I do not have to run metadata lookup to get them. If you are using the built in Schedules direct you do not get season and episode.

mgranger
Junior
Posts: 27
Joined: Mon Jul 31, 2017 9:49 pm
United States of America

Re: Mythlink.pl

Post by mgranger » Fri Feb 02, 2018 7:19 pm

I do not see the season or episode in the recorded list so I assume they are not getting put into the database. I have tried to use the metadata lookup (I am probably doing it wrong) but when I do this I always get "No Match Found for this recording. You can try entering TVDB/TMDB number, season, and episode manually"

I was under the impression I was using Schedules Direct (not sure about the tv_grab_zz_sdjson_sqlite) I do pay yearly for the account and I would rather do it this way rather than have to do a metadata lookup. Is there something else I need to do to set this up?

User avatar
pgbennett
Developer
Posts: 321
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Mythlink.pl

Post by pgbennett » Fri Feb 02, 2018 10:35 pm

The process is described here. Be aware that it is a fair amount of work as you will have to either add all of your channels again or manually update them all. If you delete and add them again you have the advantage that you will get icons for all the channels (another advantage of sdjson xmltv over data direct).

Also be aware that recordings you have made previously will not get season and episode, only new recordings made after the switch over. For recordings made before you can use metadata lookup.

https://www.mythtv.org/wiki/XMLTV#Setup ... son_sqlite
https://www.mythtv.org/wiki/XMLTV#Conve ... t_to_XMLTV

mgranger
Junior
Posts: 27
Joined: Mon Jul 31, 2017 9:49 pm
United States of America

Re: Mythlink.pl

Post by mgranger » Sat Feb 03, 2018 5:56 pm

Awesome. That seemed to work. I appreciate all the help

Post Reply