File stacking

From XBMC
Revision as of 10:39, 27 December 2011 by Ned Scott (Talk | contribs)
Jump to: navigation, search
Cleanup.png This page or section may require cleanup, updating, spellchecking, reformatting and/or updated images. Please improve this page if you can. The discussion page may contain suggestions.


XBMC's file stacking feature handles your multi-part files in a clean, intuitive manner. File stacking combines your multi-part files into a single item in the file list or library. Playback of stacks is completely transparent to you as the user, all parts are automatically queued for playback in order. Stacking is a view option available in videos file mode window. It is always applied when scanning movies into the library.

1 How does file stacking work?

The stacking function is presented with a list of file items from a directory listing.

  1. Sort the file list alphabetically.
  2. CD1, CD2, ..., CD9 directories are collapsed if they contain only one video file.
  3. Each filename is tokenized into Title, Volume, Ignore and Extension parts.
  4. For each consecutive filename where all tokens except Volume match, the file's index in the file list is stored in a vector.
  5. Once the above condition fails...
    1. The stack path is generated (eg. "stack://movie-cd1-xvid.avi , movie-cd2-xvid.avi")
    2. The stack name is created from the Title Ignore and Extension tokens (eg. movie-xvid.avi)
    3. The path and label of the first file item are replaced by the stack path and stack name, respectively.
    4. The remaining file items in the stack are removed from the file list.
  6. This continues until the file list is exhausted.

2 Tuning

File stacking can be tuned by the user to match obscure cases using the moviestacking advanced setting.

3 Deficiencies

  1. Use a dir-per-movie directory layout, see the append example of the moviestacking advanced setting.
  2. Rename offending files to match one of the more specific volume tokens (ie. cd1, part1, etc).
  3. Create special-case regular expressions for those files that fail to stack (see tuning).
Personal tools
Namespaces
Variants
Actions
Navigation
Wiki help
Google Search
Toolbox