smfontes / xbmc-mylibrary

Automatically exported from code.google.com/p/xbmc-mylibrary
0 stars 0 forks source link

Bad patches on previous build + 2 new features #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See http://forum.xbmc.org/showthread.php?tid=98210&pid=1170379#pid1170379

---
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:
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>

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

Original issue reported on code.google.com by robbiene...@gmail.com on 16 Aug 2012 at 5:19

GoogleCodeExporter commented 9 years ago
A newer patch is available in a different post that is preferred over the patch 
mentioned in this issue. See issue 4.

Original comment by robbiene...@gmail.com on 18 Aug 2012 at 3:27

GoogleCodeExporter commented 9 years ago
Fixed (see issue 4)

Original comment by bradyvid...@gmail.com on 22 Aug 2012 at 12:53