Page 1 of 1

Courses

Posted: 26 May 2020, 15:42
by Diablobait
Hello i have a few courses with this structure:

Course Name:
Lesson name 1:
1. Course 1.mp4
1. Course 1.srt
2. Course 2.mp4
2. Course 2.srt
Lesson name 2:
1. Course 1.mp4
1. Course 1.srt
2. Course 2.mp4
2. Course 2.srt

Some way to rename so plex can identify as tvshow? Something like S0101.mp4 S0101.srt
Thanks!

Re: Courses

Posted: 26 May 2020, 19:49
by kim
must be a real show or i don't think plex "can identify"

but if you wanna rename you can use this format (in F2 mode/plain file mode viewtopic.php?t=2072):

Code: Select all

{def ss = f.parentFile.name.replaceAll(/.+(\d+$)/,'$1'); fn.replaceAll(/(\d+).\s(\w+\s)(\d+$)/, {match -> match[2] + '/' + 'Season ' + ss.pad(2) + '/' + match[2] + 'S' + ss.pad(2) + 'E' + match[1].pad(2)})}
output:
Course/Season 01/Course S01E01
...
Course/Season 02/Course S02E02

Re: Courses

Posted: 26 May 2020, 20:13
by Diablobait
kim wrote: 26 May 2020, 19:49 must be a real show or i don't think plex "can identify"

but if you wanna rename you can use this format (in F2 mode/plain file mode viewtopic.php?t=2072):

Code: Select all

{def ss = f.parentFile.name.replaceAll(/.+(\d+$)/,'$1'); fn.replaceAll(/(\d+).\s(\w+\s)(\d+$)/, {match -> match[2] + '/' + 'Season ' + ss.pad(2) + '/' + match[2] + 'S' + ss.pad(2) + 'E' + match[1].pad(2)})}
output:
Course/Season 01/Course S01E01
...
Course/Season 02/Course S02E02
It works perfect to rename the subs as same as video files, but dont add the season number, will need something like S01E05 S04E01, i know plex wont get the tvshow number but i can add a Poster, name and description and will work for Lessons Library, thanks btw!

Image

Re: Courses

Posted: 27 May 2020, 00:29
by kim
your "structure" is not what you said = fail

Code: Select all

{def ss = f.parentFile.name.replaceAll(/.+(\d+$)/,'$1'); fn.replaceAll(/(\d+).\s(.+)/, {match -> match[2] + '/' + 'Season ' + ss.pad(2) + '/' + match[2] + ' - S' + ss.pad(2) + 'E' + match[1].pad(2)})}

Re: Courses

Posted: 27 May 2020, 03:52
by Diablobait
kim wrote: 27 May 2020, 00:29 your "structure" is not what you said = fail

Code: Select all

{def ss = f.parentFile.name.replaceAll(/.+(\d+$)/,'$1'); fn.replaceAll(/(\d+).\s(.+)/, {match -> match[2] + '/' + 'Season ' + ss.pad(2) + '/' + match[2] + ' - S' + ss.pad(2) + 'E' + match[1].pad(2)})}
Works good except after Season 9 start again with Season 00 and the first folder get the file name, not the course name.

Image
Image

Re: Courses

Posted: 27 May 2020, 16:48
by kim

Code: Select all

{def ss = f.parentFile.name.replaceAll(/.+\s(\d+)$/,'$1'); fn.replaceAll(/(\d+).\s(.+)/, {match -> match[2] + '/' + 'Season ' + ss.pad(2) + '/' + match[2] + ' - S' + ss.pad(2) + 'E' + match[1].pad(2)})}