Kodi Community Forum

Full Version: XBMC, Library Mode, Path exclusions, regex help.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, I've been using Video | Files with the List view type for quite a while.

I've got a huge collection of movies and TV shows mixed together.
I want to start using library mode for Movies and TV Shows so as to have all the extra information available that just doesn't show without enabling Library mode and scraping.

Now I know that having TV Shows and movies mixed together is generally though of as bad (although really, to keep some "sets" together it made a lot of sense for the longest time).

I believe I may be able to keep things just as they are if I can get proper exclude path options built for the scraper settings.

Currently every movie path has the following in it somewhere in the path (without quotes):
Code:
"  (####)"
That is 2 spaces, open parentheses, 4 digits for the year, and then close parentheses.
Meanwhile all of my TV shows have the following in the path (without quotes):
Code:
"  (####-*)"
That is 2 spaces, open parentheses, 4 digits for started airing year, a dash, 0 or more characters, and then a closing parentheses.

I'd also like it to not add anything from any extras or subs paths to the library. Mostly because some of the items in extras folders are either dupes of the episode/movie at a different quality rating or aspect ratio or just isn't well organized comparatively.

Since I have a rather large library it would be nice if someone could confirm for me that the following content exclude path options would likely be correct (basically double check my regex) before I enable library mode on my video path and start it scanning:

TV Shows Exclude Path Expression (should skip Movies {2spacesOpenparen4digityearCloseparen}, /extras/, /subs/ folders):
Code:
((  \((19[0-9][0-9]|20[0-9][0-9])\))|(\/extras\/)|(\/subs\/))
Movies Exclude Expression (should skip TV shows {2spacesOpenparen4digityearDashAnycharexceptforwardslashornocharsCloseparen}, /extras/, /subs/ folders):
Code:
((  \((19[0-9][0-9]|20[0-9][0-9])-[^\/]*\))|(\/extras\/)|(\/subs\/))

Based on my described formatting will those excludes be correct?

Thanks.



Ok, maybe I should give a better description of what I have and what I am hoping/thinking/planning on doing.

First, from the video section of my sources.xml:
Code:
<source>
            <name>TV Shows!  &amp;  Movies!</name>
            <path pathversion="1">smb://VIDSERVER3/TV/</path> <!-- Dummy entry so XBMC allows unique content type setting (TV), NO FILES! -->
            <path pathversion="1">smb://VIDSERVER3/Video/</path>
            <path pathversion="1">smb://VIDSERVER4/Video/</path>
            <path pathversion="1">smb://VIDSERVER5/Video/</path>
            <path pathversion="1">smb://VIDSERVER6/Video/</path>
        </source>
        <source>
            <name>Movies!  &amp;  TV Shows!</name>
            <path pathversion="1">smb://VIDSERVER3/Movies/</path> <!-- Dummy entry so XBMC allows unique content type setting (Movies), NO FILES! -->
            <path pathversion="1">smb://VIDSERVER3/Video/</path>
            <path pathversion="1">smb://VIDSERVER4/Video/</path>
            <path pathversion="1">smb://VIDSERVER5/Video/</path>
            <path pathversion="1">smb://VIDSERVER6/Video/</path>
        </source>

As can be seen there I've essentially created identical sources. The one different path in each multi-path source is empty but allows XBMC to treat the overall source as a new item/path for setting Content Type. Thus I can set Content type of TV for the entire multi-source path of "TV Shows! &amp; Movies!" and I can set Movies as the content type for "Movies! &amp; TV Shows!". Essentially setting 2 content types for all of my content.

I can hear it now I'll end up with a boatload of dupes and garbage from the scrapings. However as I described in the initial post although all of my movies and TV shows are combined under the general folders of Video, they each have their own very distinct naming convention.

Here is an example of some of the folders to show the naming convention I've been using (since long before I started using XBMC):
Code:
/Video/A/Accepted  (2007)/
/Video/A/Accepted  (2007).x264.720p.mkv
/Video/A/Airwolf  (1984-1987)/
/Video/A/Airwolf  (1984-1987)/S01/
/Video/A/Airwolf  (1984-1987)/S01/Airwolf.S01E01E02.(1984-01-22).Shadow of the Hawke (1) & (2).avi
/Video/A/Airwolf  (1984-1987)/S01/Airwolf.S01E03.(1984-01-28).Daddy's Gone a Hunt'n.avi
/Video/A/Airwolf  (1984-1987)/S01/..
/Video/A/Airwolf  (1984-1987)/S01/Airwolf.S01E12.(1984-04-14).To Snare a Wolf.avi
/Video/A/Airwolf  (1984-1987)/S01/extras/
/Video/A/Airwolf  (1984-1987)/S01/extras/Airwolf.(1984-01-28).Daddy's Gone a Hunt'n.lowerVid.betterAud.avi
/Video/A/Airwolf  (1984-1987)/S02/
/Video/A/Automan  (1983-1984)/
/Video/A/Automan  (1983-1984)/Automan.S01E01.(1983-12-15).Automan.avi
/Video/A/Automan  (1983-1984)/..
/Video/A/Automan  (1983-1984)/Automan.S01E12.(1984-04-02).Death By Design.avi
/Video/A/Automan  (1983-1984)/Automan.S01E13.(1984-04-09).Club Ten.avi

Now the idea is to use the advancedsettings.xml options to allow each library scan/scrape to avoid crossing by using the exclusion paths as such:
Code:
<video>
  <excludefromscan>
    <regexp>((  \((19[0-9][0-9]|20[0-9][0-9])-[^\/]*\))|(\/extras\/)|(\/subs\/))</regexp>  <!-- Exclude TV shows (year-), extras, subs folders from General/Movie Library scans -->
  </excludefromscan>
  <excludetvshowsfromscan>
    <regexp>((  \((19[0-9][0-9]|20[0-9][0-9])\))|(\/extras\/)|(\/subs\/))</regexp>  <!-- Exclude Movies(year only), extras, subs folders from TV Show Library scans -->
  </excludetvshowsfromscan>
</video>

Just like a bit of confirmation I have the regular expressions correct before I hit go on either scanner. After it is a lot of content to scan twice already as it is, even worse if I screw up, have to dump the data and scan again.

Thanks alot.

Can't you just match ^s([1-9][0-9]) in all paths? As in (s01, s02, s03, ect). Movies won't have season indicators.

But seriously, Just make 2 folders. 1 for movies and 1 for tv. And buy your girl some flowers.
Nor will multi-part TV Mini-series type shows and one off shows. However, every show will have an air date for at least one episode and thus all will have at the very least a year with a dash inside parentheses (unaired episodes would get a year and dash with no date).

Since I care less about release dates for movies those only have the four digit year.

Also, once fully imported into the libraries I'll be able to switch mostly to views like "Info List" and thus even while browsing "Files" those shows with library data will display that data for those movies/shows/episodes while allowing me to navigate a structure that makes more sense [to me] than the Library mode views themselves (eg: a show that runs 2 seasons, has a 10 part webisode set, then another season, then 1 theatrical movie, a 10 minute webisode, then 3 more seasons). Or a TV show that was actually multiple TV series and movies that are considered part of the same story but where the seasons and episodes are not the recommended viewing order for the episodes and movies (eg: show1.season1, movie1, show1.seasons 2-4 except last episode of season 4, movie3, show1.season4 last episode, show2.seasons 1+2, show1.seasons 5+, movie2, show2 remaining seasons). Browsing them in TV Show or Movie Library mode even with Movie Sets is cumbersome. Browsing in File Mode view is intuitive since the structure can be made to fit the best viewing properly.

It is the very ability of XBMC to display information for those items that are in one of the libraries while also viewing in File mode that I am more interested in than actually using the library modes themselves.

Personally just wish XBMC had the ability without enabling any library modes to just display information if a file is found for TVSHOW.nfo, and <episode>.ext + <episode>.nfo, and <movie>.ext + <movie>.nfo if those already exist without import/enable library modes. Nearly all of my movies and shows have those already due to the renaming application I had been using. Just don't have those for a lot of the extras, and for many of the webisode ones.

I suppose I could just create 2 smaller sources with a single letter and thus a small subset of my current videos to test out.

Thanks anyway to those who looked.