39 lines
1.8 KiB
Markdown
39 lines
1.8 KiB
Markdown
I would like for you to build out a tool that will help me label all the files in a folder.
|
|
|
|
You'll be passed a folder path. Inside that folder path will be a bunch of mkv files. Your job is sort the classify each of the files as either "episodes" or "extras".
|
|
|
|
If a file is an extra, place it in a folder called "extras".
|
|
|
|
Files that are extras have the following characteristics
|
|
- they're much smaller than the average size of all the files. So if most files are 1GB, the extra is 30 MB
|
|
- Any files that is not an episode is an extra
|
|
|
|
If you think a file is an extra, move the file to "extras" folder.
|
|
|
|
Files that are episodes have the following characteristcs
|
|
- they tend to be the largest files in the folder
|
|
- the length of the video matches what tvdb says the episode length is for the season.
|
|
|
|
If you think a file is an episode, label the file in the following format
|
|
|
|
<tv show> s<season number>e<episode number>. Refer to Jellyfin documentation for show labeling if you need more info.
|
|
|
|
Examples
|
|
the show Game of Thrones, season 1, episode 4 will be labeled "Game of Thrones s01e04"
|
|
Teen Titans Season 4, episode 3 will be "Teen Titans s04e03"
|
|
Dragon Ball Z Season 4, episode 20 will be "Dragon Ball Z s04e20"
|
|
|
|
Assume all episodes are present in the folder to compose an entire season of the show. Therefore, do not exit successfully if you do not label
|
|
all episodes for the season.
|
|
|
|
You have two folders, Matcher and TVDBProvider.
|
|
|
|
Inside of Matcher, put all the code for matching episodes
|
|
Inside of TVDBProvider code, put all the code for pulling the show season details
|
|
|
|
Assume that I'll give you the following information
|
|
- Directory of all the mkv files
|
|
- Show Name
|
|
- Show Season
|
|
|
|
Query TVDB to get the duration of each episode to help you with matching and renaming. Verify that you properly renamed all the files. |