Kodi Community Forum

Full Version: Option to stack folders
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
All of my multi-part movies are in a CDx folder structure.
C:\MovieName1\CD1\firstpartbeginning.avi
C:\MovieName1\CD2\secondpartmiddle.avi
C:\MovieName1\CD3\thirdpartend.avi
Obviously this isn't going to stack if it were based on the file names.

I'd like a feature where we can stack based on folder names, regardless of the .avi filenames.
Regex misses the majority when based on the varying .avi filenames, where all my movies have the same CDx FOLDER scheme.

I believe this code is what needs tweaking:
http://pastebin.com/m373dc0ed
It would be amazing to have this as an option, or for an unofficial tweak.
The code you link to indicate that those will stack anyway, under the assumption that there's only one video file in each of those CD* folders.
I should mention my files are in multi-rar format.
XBMC only detects CD1 in the following case:

F:\! DVDRiP Collection\21.Grams.2003.WS.DVDRip.XviD\grams.xvid.nfo
F:\! DVDRiP Collection\21.Grams.2003.WS.DVDRip.XviD\CD1\grams.1.xvid.rar\grams.1.xvid.avi
F:\! DVDRiP Collection\21.Grams.2003.WS.DVDRip.XviD\CD2\grams.2.xvid.rar\grams.2.xvid.avi
(there is no space in grams.1.xvid.rar and grams.2.xvid.rar, dunno why the forums are doing that)

I can provide more examples of faulty stacking if, as you suggest, it already stacks based on the folder structure.
There doesn't appear to be any rars in that file listing you've given.
I figure I should have clarified:

"grams.1.xvid.r(xx)\grams.1.xvid.avi"
grams.1.xvid.rar being the first part of the multi-part .rar files..
grams.1.xvid.avi being the filename of the movie INSIDE the multi-part .rar files...

Image
The problem is it's using .1 and .2 which could be a sequel. You could add the regexp as suggested in the AdvancedSettings.xml page in the online manual.
The reason for the feature suggestion was to null out the use of
having to scan through my entire library and add a bunch regexs' for the movies.

I'm certain a large user-base of XBMC uses the CDx folder structure,
and would love to have their movies stacked based on (regex) FOLDERS.

This would guarantee the stacking of 400+ of my movies..
Where as, by the default (filename)regexps in XBMC, it only stacks 1/4th of them. No

Do you think this would be possible?

-----
EDIT:
F:\! DVDRiP Collection\Catch.Me.If.You.Can.DVDRip.XviD\CD1\cmiyc1.r(xx) (multiple .rar files)
F:\! DVDRiP Collection\Catch.Me.If.You.Can.DVDRip.XviD\CD2\cmiyc2.r(xx) (multiple .rar files)
Inside these .rar files are the .avi files: cmiyc1.avi & cmiyc2.avi - These would not stack unless I added a regexp.
They would stack regardless if folder stacking were enabled for CDx - regardless of the .avi filenames.
-----
EDIT:
F:\! DVDRiP Collection\As.Good.As.It.Gets.1997.AC3.DVDRiP.XviD\agaig.nfo (http://us.imdb.com/Title?0119822)
F:\! DVDRiP Collection\As.Good.As.It.Gets.1997.AC3.DVDRiP.XviD\CD1\agaiga.rar+(r01-48) // inside = agaiga.avi
F:\! DVDRiP Collection\As.Good.As.It.Gets.1997.AC3.DVDRiP.XviD\CD2\agaigb.rar+(r01-48) // inside = agaigb.avi
XBMC gives me an error stating: "No video files found in this path!"

I'm assuming this is because there is no regex match for this.
Once again, this SHOULD stack if there was folder stacking, without the need to add another regexp.
insanity lies just a little further ahead
you have to add a regexp? THE WORLD IS COMING TO AN END!
The problem isn't the 1,2 in the CD* folders, it's the 1,2 in the filenames with no other volume identifier. We don't even look at the CD* folder when stacking, it's collapsed before the algorithm is applied. A default expression to match these would lead way to an unacceptable false stacking of sequels in a flat dir structure.
kornychaos Wrote:The reason for the feature suggestion was to null out the use of
having to scan through my entire library and add a bunch regexs' for the movies.

I'm certain a large user-base of XBMC uses the CDx folder structure,
and would love to have their movies stacked based on (regex) FOLDERS.

I think that adding a REGEX is a lot easier than having the developers go through the trouble of adding specific instructions for every possible way people might want to organize their movie collections. That is why the options exist to do this at the user level, it makes XBMC much more customizable than having to feature request every little thing.

If there is such a large user-base using this folder structure for their movies, you should maybe ask how they are scanning them, it doesn't appear as though they are waiting for this feature to be added.

Just my two cents, but it appears this problem is solvable through already established methods - REGEX.
althekiller Wrote:The problem isn't the 1,2 in the CD* folders, it's the 1,2 in the filenames with no other volume identifier. We don't even look at the CD* folder when stacking, it's collapsed before the algorithm is applied. A default expression to match these would lead way to an unacceptable false stacking of sequels in a flat dir structure.

I too would love this feature.
I have a lot of movies, all in separate dirs, and some are 2 CD or more.
renaming them...no :p


that I see filestacking happen on screen is not really important to me.
but when using scrapers to get info, it just messes up your whole lib with duplicate results.
I use foldernames for the lookup.
I believe this is the result of filestacking looking at the filename instead of the foldername.

I think your flat dir structure problem shouldnt be an issue if you count the movie files in the dir and it is 1.
(i've never seen a scene release with more then 1 movie file in a CD1 folder so this will be a positive addition to xbmc.)
you could just ignore the name of the file itself, aslong as it is a movie file.
this shouldnt even mess up that DVD or audiocd's or TV shows are displayed incorrectly.
and for the stackfilename that is displayed to the user, you could use the parent folder of CD1/CD2 etc, even clean the name if you want.

example that does not work with current stacking system:

\Movies\Avatar.RETAIL.DVDRip.XviD-DiAMOND\CD1\dmd-avatar1.avi
\Movies\Avatar.RETAIL.DVDRip.XviD-DiAMOND\CD2\dmd-avatar2.avi
\Movies\Avatar.RETAIL.DVDRip.XviD-DiAMOND\CD3\dmd-avatar3.avi