Courses

Any questions? Need some help?
Post Reply
Diablobait
Posts: 3
Joined: 26 May 2020, 15:39

Courses

Post 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!
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Courses

Post 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
Diablobait
Posts: 3
Joined: 26 May 2020, 15:39

Re: Courses

Post 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
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Courses

Post 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)})}
Diablobait
Posts: 3
Joined: 26 May 2020, 15:39

Re: Courses

Post 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
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Courses

Post 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)})}
Post Reply