<div dir="ltr">Here's some of the relevant code.   It's not everything, but it should get you started.<div><br></div><div>This was written just for TV shows, then I added the movie bit.</div><div><br></div><div>(plextitle is a table I created that allows me to translate titles that have invalid characters for filenames)</div><div><br></div><div><br></div><div><div>plextitle=`echo "select plextitle from plexnames where title=\"$title\";" | $mysqlconnect`</div><div>if [ -z "$plextitle" ];then</div><div>        plextitle=`echo $title |  sed -e "s/ /${separator}/g" | sed -e "s/[,\/\"\'\.()]//g"`</div><div>fi</div><div>season=`echo "select season from recorded where basename=\"$BASENAME\";" | $mysqlconnect`</div><div>episode=`echo "select episode from recorded where basename=\"$BASENAME\";" | $mysqlconnect`</div><div><br></div><div>info=`echo "select title, subtitle from recorded where basename=\"$BASENAME\";" | $mysqlconnect`</div><div>echo "Basename = $BASENAME"</div><div>echo "Season $season Episode $episode"</div><div>echo $info</div><div>echo '**************************************************************'</div><div><br></div><div>if [ $episode -gt 0 ]</div><div>then</div><div>        s=`printf %02d $season`</div><div>        e=`printf %02d $episode`</div><div>        se="S${s}E${e}."</div><div>else</div><div>        se=""</div><div>fi</div><div><br></div><div>if [ -n "$subtitle" ];then</div><div>        t=`echo $subtitle |  sed -e "s/ /${separator}/g" | sed -e "s/[,;\/\"\'\.()]//g"`</div><div>        t="${t}."</div><div>else</div><div>        t=""</div><div>fi</div><div><br></div><div>...</div><div><div>echo "Checking for Directory ${tvlib}/${plextitle}"</div><div>if [ -d "${tvlib}/${plextitle}" ]</div><div>then</div><div>        FINALFILE="${tvlib}/${plextitle}/${plextitle}.${se}${t}${finalext}"</div><div>        if [ -z "${se}" ];then</div><div>                echo $FINALFILE | mail -s "No Season/Episode for ${FINALFILE}" <a href="mailto:jbalcorn@gmail.com">jbalcorn@gmail.com</a></div><div>        fi</div><div>elif [[ $programid =~ ^MV ]];then</div><div>        airdate=`echo "SELECT airdate FROM program WHERE programid = '${programid}';" | $mysqlconnect`</div><div>        if [ -z "$airdate" ];then</div><div>                airdate=`echo "SELECT originalairdate FROM recorded WHERE  basename=\"$BASENAME\";" | $mysqlconnect`</div><div>                mvyear=`echo $airdate | cut -d'-' -f1`</div><div>        else</div><div>                mvyear=`echo $airdate | cut -d' ' -f1`</div><div>        fi</div><div>        FINALFILE="/mnt/disk/share/movies/${plextitle}.${mvyear}.${finalext}"</div><div>else</div><div>        PREFIXDT=`date -d "${starttime} UTC" "+%Y-%m-%d"`</div><div>        PREFIXTITLE=`echo $plextitle | sed -e "s/${separator}/ /g"`</div><div>        FINALFILE="${reclib}/${PREFIXTITLE} ${PREFIXDT}.${t}${finalext}"</div><div>fi<br></div><div>echo "Final File will be ${FINALFILE}"</div></div><div><br></div><div><br></div><div>I use the FINALFILE as output for transcode, you could just  use it for the symbolic link.</div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>-- <br>Justin B. Alcorn</div><div>The views expressed are not necessarily my own, much less anyone else's<br>PGP Fingerprint CCEB F776 C3FD 1050 C8DB  532E B8B9 BED7 7764 406C</div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 8, 2018 at 11:28 AM Justin Alcorn <<a href="mailto:justin@jalcorn.net">justin@jalcorn.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You'd have to write your own but it's not difficult.  I transcode and cut the movies and TV shows and I look up the year of the movie using the 'airdate' field in the 'program' table to name the movies name.year.mp4.  I know it's a movie because the programid starts with 'MV'<div><br></div><div>It could easily do the same to just create the symlinks<br clear="all"><div><div dir="ltr" class="m_8847562144746628595gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>-- <br>Justin B. Alcorn</div><div>The views expressed are not necessarily my own, much less anyone else's<br>PGP Fingerprint CCEB F776 C3FD 1050 C8DB  532E B8B9 BED7 7764 406C</div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 6, 2018 at 1:04 AM Mark Perkins <<a href="mailto:perkins1724@hotmail.com" target="_blank">perkins1724@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Has anyone looked into how <a href="http://mythlink.pl" rel="noreferrer" target="_blank">mythlink.pl</a> can be used to create 'readable'<br>
filename links that can be parsed by Plex - particularly / specifically also<br>
placing tv shows in a different folder to movies?<br>
<br>
<a href="http://mythlink.pl" rel="noreferrer" target="_blank">mythlink.pl</a> seems to have quite an extensive amount of options but I can't<br>
immediately determine a way to separate movies into a different directory /<br>
hierarchy to tv shows.<br>
<br>
<br>
<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</blockquote></div>
</blockquote></div>