Posted: Thu May 15, 2008 6:56 am Post subject: Dynamic metadata
Sorry for the multiple posts, but I wanted each idea in it's own topic.
I've got a lot of series TV hosted by my pyTiVo. It's all laid out in a nice directory format broken up by series, season, etc. with file names indicating the season's episode #.
Series A\Season 01\01-Episode1
Series A\Season 02\01-Episode1
Series B\Season 01\01-Episode1
etc.
This works great for a file structure but in the NPL I end up with series and season episodes all jumbled together:
01-Episode1
01-Episode1
01-Episode1
I realize I could use a metafile for each video file to fix this issue - but that's a LOT of metafiles to be created. And I'm lazy.
So I fiddled a bit around line 285 of the pluigins\video\video.py file with the following:
Code:
if key.startswith('seriesT'):
# regEx = re.compile( '%n')
# value = regEx.sub( fileName, view)
value = value.replace('%n', 'fname')
value = value.replace('%x', 'ext')
value = value.replace('%p', 'parent')
This opens up all sorts of possibilities of abusing, um, I mean enhancing default.txt metadata files.
For example - tweaking 3 default.txt files like this:
seriesTitle : Series A 01.%n (where %n is file name)
seriesTitle : Series A 02.%n
seriesTitle : Series B 01.%n
Could show up in the NPL as:
Series A 01.01-Episode1
Series A 02.01-Episode1
Series B 01.01-Episode1
Or even better (assuming I could get it working) a more generic:
seriesTitle : %p.%n (where %p is parent folder name and %n is file name).
With a little more thought we could probably make it very generic and just allow regular expressions. This would enable things like being able to remove file extensions and the like.
By applying it to more than just seriesTitle we could do things like auto-populate episode # (assuming a file naming convention that begins with "ep-" for example) or include actual/original file name in the Info section so an NPL entry could have an abbreviated series name to better fit the screen, but we could still get the full series name on the info screen.
Does this sound like a useful feature to anybody else?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum