2012-08-16, 07:17
I did some more work on the tool tonight. I fixed the problems with the recently applied patches and I also added a couple of new features for TV Show types.
New Feature #1
The first feature addresses problem with the series and title parsing using the default parser. This was reported by ThermoDust originally, and brought up again recently here. The way that I thought would be best to address it is by giving the user the ability to specify a regex pattern in the subfolder configuration that would be used to parse the series and title. It expects the pattern to specify 2 groups (denoted with rounded brackets: read more here). The first group is expected to be the series name and the second group is expected to be the title of the episode. A couple of resources for building regular expressions are: here and here.
It is specified in the configuration from within the subfolder element like so:
Example debug output:
New Feature #2
The second feature allows a user to completely override any parsed series name, even if it is one that is parsed with the custom parser above. It was injected at the start of the TVDB lookup method, so if that is not called, it will not be applied however. Items that have a proper sXXeXX format found in them will be parsed without the override, even if it is found in the config.
I developed this feature specifically for my TED need described in previous posts in this thread. The suggestion to use the ManualArchiving worked "OK" when configured to a HoursThreshold of "0.001" but it ended up putting everything into separate folders. I didn't want it trying to figure out a series from the titles of the TED talks and preferred instead that they all just write into a single directory called "TED". So this is how I accomplished that.
It is specified in the configuration from within the subfolder element like so:
You can download the binary from here
The patch is available here: http://code.google.com/p/xbmc-mylibrary/...etail?id=3
New Feature #1
The first feature addresses problem with the series and title parsing using the default parser. This was reported by ThermoDust originally, and brought up again recently here. The way that I thought would be best to address it is by giving the user the ability to specify a regex pattern in the subfolder configuration that would be used to parse the series and title. It expects the pattern to specify 2 groups (denoted with rounded brackets: read more here). The first group is expected to be the series name and the second group is expected to be the title of the episode. A couple of resources for building regular expressions are: here and here.
It is specified in the configuration from within the subfolder element like so:
Code:
<subfolder name="My Show" type="episodes" >
<!--Parse the series name then the title of the episode -->
<parser>
<regexp>([\w\s*'-]*):([\w\s*'-]*)</regexp> <!-- ex: "Show Name: Title of the Episode" -->
</parser>
</subfolder>
Example debug output:
Code:
08/16/2012 12:47:19 AM DEBUG Archiving Attempting default parsing of TV Show...
08/16/2012 12:47:19 AM DEBUG Archiving Found custom series and title parser.
08/16/2012 12:47:19 AM DEBUG Archiving Custom series and title parser regex: ([\w\s*'-]*):([\w\s*'-]*)
08/16/2012 12:47:19 AM DEBUG Archiving Found series "Stephen Ritz: A teacher growing green in the South Bronx", and title "Stephen Ritz", from file label "Stephen Ritz: A teacher growing green in the South Bronx" using a custom parser. Will use this info to look up on the TVDB.com
New Feature #2
The second feature allows a user to completely override any parsed series name, even if it is one that is parsed with the custom parser above. It was injected at the start of the TVDB lookup method, so if that is not called, it will not be applied however. Items that have a proper sXXeXX format found in them will be parsed without the override, even if it is found in the config.
I developed this feature specifically for my TED need described in previous posts in this thread. The suggestion to use the ManualArchiving worked "OK" when configured to a HoursThreshold of "0.001" but it ended up putting everything into separate folders. I didn't want it trying to figure out a series from the titles of the TED talks and preferred instead that they all just write into a single directory called "TED". So this is how I accomplished that.
It is specified in the configuration from within the subfolder element like so:
Code:
<!-- Newest TED Talks -->
<subfolder name="Newest Talks" type="episodes" suffix=" (TED)" >
<!--Override any parsed series name with the following constant -->
<ForceSeries>TED</ForceSeries>
</subfolder>
You can download the binary from here
The patch is available here: http://code.google.com/p/xbmc-mylibrary/...etail?id=3