there is a feature for what I'm trying to do, it's called sets, what you need is an
nfo file to define the video as part of a set
- enable grouping in sets: settings -> videos -> library -> group movies in sets
- create your .nfo files (section "4 Movie sets" in the above link)
- now scan your files as movies using themoviedb scraper
- go to movies --> sets --> right click you new set and select "manage" then choose the cover art for it.
of course creating .nfo's for hundreds of videos is horrible, here's an easy example of how you can automate it:
Code:
#!/usr/bin/python
import glob, re
search_string = '*.mkv'
movie_file_name_regex=r'-\s(.*?)\.'
setname='The Complete Goofy'
sort_title_name='Goofy'
setmetadata = 'http://www.themoviedb.org/movie/293973-walt-disney-treasures-the-complete-goofy'
for moviefile in glob.glob(search_string):
fullfilename = moviefile.split('.')
match = re.search(movie_file_name_regex,moviefile)
filename = match.group(1)
number = moviefile.split(' ')
sort_title = sort_title_name + ' ' + number[0]
fo = open(fullfilename[0] + '.nfo', "wb")
setxml='''<movie>
<title>{0}</title>
<set>{1}</set>
<sorttitle>{2}</sorttitle>
</movie>
{3}
'''.format(filename, setname, sort_title, setmetadata)
fo.write(setxml)
fo.close()
Populate the first 5 variables for your use case then copy the script into the directory with all the files and run.
My video files are manually numbered to keep them in order eg 21 - Canine Casanova.mkv" The regex in my example is required to get only the name without the number and extension for use in the title element. I've kept the ability to sort by reusing that number in the sorttitle element however.
Of course I'm not taking into account all file naming possibilities here, having a "." anywhere else in the file name other than before the extension would break my script for example.
This is how my .nfo file looks for "21 - Canine Casanova.mkv":
Code:
<movie>
<title>Canine Casanova</title>
<set>The Complete Goofy</set>
<sorttitle>Goofy 21</sorttitle>
</movie>
http://www.themoviedb.org/movie/293973-walt-disney-treasures-the-complete-goofy
I also don't know how you would achieve the same on OpenELEC type devices where there is no access to the underlying OS.