Code: Select all
y:\TOSORT\{c{genres.take(3).join(' ').match(/Horror|Comedy|Documentary|Drama|Children|Reality|Game Show|Science-Fiction|Adventure|Action|Animation|Anime/)} ?: "Unknown"/{genres}}\{n.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', $1')}\Season {s.pad(2)}\{n.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', $1')} - S{s.pad(2)}E{e.pad(2)} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}
and the TOSORT folder is because i have my files on different harddrives based on genre so i just move them manually after they get in TOSORT
i'm looking to update it with the more modern scripting as i haven't really updated this in a a LONG time.
i intend to replace S{s.pad(2))}E{e.pad(2)} with {S00E00} but there are some bugs with this i'm not happy with(that bit fixes the first problem though)
first is the handling of multipart files so now it'll be Show - S##E##-E## - title.ext as my present just shows one episode per file.(as i said though that one fix fixes that)
second is the handling of multipart titles themselves as it only shows the first episodes title. but i don't know if kodi can handle two titles.
third is handling of anime. right now its showing as SE## and that breaks alot of managers handling so they just don't see them.
fourth is handling different versions of series. like example Those Who Kill right now it shows "Those Who Kill, Part Us" and i'm looking for it to show "Those Who Kill (Us)" and The Librarians shows as "The Librarians, 2014" looking for that to be simlar(for continuity with the region different names) example "The Librarians (2014)"
fifth the genre detection is still bugged. if it doesn't detect a genre it just shows nothing instead of Unknown
so if someone could help me figure out how to fix those problems or just simply clean up this script with more updated scripting methods it would be great.