Kodi Community Forum
Only add single movie per folder? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Only add single movie per folder? (/showthread.php?tid=191868)



Only add single movie per folder? - sl4ppy - 2014-04-10

Giving xbmc a try as a longtime MyMovies user..

I currently have about 1500 DVD and BluRay ISO's stored in the following format:

Movies
|----The Wolf of Wall Street (2014)
|.......|----The Wolf of Wall Street (2014).ISO
|.......|----The Wolf of Wall Street (2014).MP4
|.......|----<various meta-data and image files>

Nearly every folder has both the ISO and the MP4; I do this for portability reasons so I can just throw the MP4 on a iPad or whatever quickly for trips, the kids, etc.

Is it possible to have XBMC scrape the entire movies folder but only add the ISO in the directory to the library of movies ignoring the other files? Currently, it scrapes everything and I get 2 entries for every movie I have... Sad

Thanks in advance!


RE: Only add single movie per folder? - Vaikin - 2014-04-10

You probably want to look at: http://wiki.xbmc.org/?title=Advancedsettings.xml#excludefromscan


RE: Only add single movie per folder? - sl4ppy - 2014-04-10

(2014-04-10, 03:13)Vaikin Wrote: You probably want to look at: http://wiki.xbmc.org/?title=Advancedsettings.xml#excludefromscan

Hmm.. I might need to do more than just exclude as some of my really old stuff only has an .mp4 or whatever..

Do regex conditionals work with XBMC? ie: (?(1)B|C) : if 1 then B otherwise C??


RE: Only add single movie per folder? - sl4ppy - 2014-04-10

Or maybe just something as simple as this?

(.*)(\.iso)|(.*)(\.mp4)|(.*)(\.dvr-ms)|(.*)(\.wtv)


RE: Only add single movie per folder? - sl4ppy - 2014-04-10

Not having much luck with this..

The first two excludes lines are just for the trailer.mov in each folder, but it still adds them every time.

If I understand correctly, the excludefromscan excludes the matched pattern, correct? So my conditional if there is an .mp4 match the .mp4; otherwise match the .iso doesn't work either as it adds both the .mp4 and .iso... But that seems the more minor of the problems. If I can't exclude the trailers, I'm doing something very basic incorrectly.

I am storing advancedsettings.xml in the folder C:\Users\<username>\AppData\Roaming\XBMC

Code:
<advancedsettings>
    <loglevel hide="false">3</loglevel>
    <video>
      <excludefromscan>
          <regexp>(trailer)(.*)</regexp>
          <regexp>trailer.mov</regexp>
        <regexp>(?=((.*)(\.mp4|\.MP4)))((.*)(\.mp4|\.MP4))|((.*)(\.iso|\.ISO))</regexp>
      </excludefromscan>
    </video>
</advancedsettings>



RE: Only add single movie per folder? - Ned Scott - 2014-04-10

I don't think so, but one idea would be to name those specific files something like: The Wolf of Wall Street (2014).ipad.MP4, and then exclude anything with ".ipad." in it.


RE: Only add single movie per folder? - sl4ppy - 2014-04-10

(2014-04-10, 05:04)Ned Scott Wrote: I don't think so, but one idea would be to name those specific files something like: The Wolf of Wall Street (2014).ipad.MP4, and then exclude anything with ".ipad." in it.

Hmm.. I'd prefer not to much with the MyMovies setup I already have working...

Is the library stored somewhere in human readable format such that maybe I can go in and manually remove the double entries?


RE: Only add single movie per folder? - pr0xZen - 2014-04-10

Export library -> do your edits -> import library. Not necessarily a simplea or easy task, but it is possible. Suggest you search the forum for removing double entries or similar - such has been covered many, many times.


RE: Only add single movie per folder? - sl4ppy - 2014-04-13

(2014-04-10, 17:19)pr0xZen Wrote: Export library -> do your edits -> import library. Not necessarily a simplea or easy task, but it is possible. Suggest you search the forum for removing double entries or similar - such has been covered many, many times.

I played around with this method.. It seems tedious to do for 1500 movies and adds a lot of extra steps when adding new movies. Also, I'd just prefer not trying to remove duplicate entries but rather not add movies with multiple formats in the same folder.

Surely some form of conditional regex like I mentioned before could work here?

I'm still experimenting.


RE: Only add single movie per folder? - Ned Scott - 2014-04-14

No, conditional regex is not supported for scanning.


RE: Only add single movie per folder? - pr0xZen - 2014-04-15

Why not put all the other files in a subsequent subfolder, and have "scan recursively" unticked on the source contents? AFAIK, if you untick "scan recursively" - XBMC will only scan that source 1 folder "deep". Example:

ShareRoot \ James Bond - Casino Royale \ James.Bond.Casino.Royale.BluRay.1080p.mkv - This is picked up.
ShareRoot \ James Bond - Casino Royale \ SD \ James.Bond.Casino.Royale.Ipad.mp4 - not picked up.

This might require a little restructuring and file work - but if your file names and extensions for the "other" files are relatively consistant, this should be a fairly easy batch job.