Stacking: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Sho
(added link to regexp)
>Sho
(rewrite)
Line 1: Line 1:
When using the 'File' view, XBMC has the ability to recognize 'multipart' videos based on filename rules. When a stacked selection is selected for playback, you must choose which part you wish to play. Only video files are examined for stacking possibility. There are currently two types of stacking which can be specified by using the 'Stacking' option in MyVideo:
When in [[My Videos#File View|File Mode]], XBMC has the ability to recognize and present 'multi-part' video files based on filename stacking rules. For example a two part VCD can be displayed and played as a single file in the user interface.
 
==Stacking in XBMC==
Stacking can be toggled on / off while in [[My Videos#Files View|File Mode]] in My Videos.
How stacked files are presented to the user can be configured with the  [[My Videos Settings#General|Treat Stacked Files as a Single File]] under Video Setings.
The default stacking rules are rather "wide" and can cause files you normally would not want to stack to be stacked (e.g. rolling filenames from  digital cameras, TV shows etc.) 
The regular expressions that control stacking can be changed by the [[AdvancedSettings.xml#.3Cmoviestacking.3E|moviestacking ]] tag in [[AdvancedSettings.xml]].
 
Stacking is only available for video media.


The regular expressions that control stacking can be changed in [[AdvancedSettings.xml#.3Cmoviestacking.3E|AdvancedSettings.xml]]
==Stacking Filename Syntax==
==Stacking Filename Syntax==
If a filename ends with specific types of strings (example: "-CD1", "-CD2" disregarding the extension), then multiple files will be collapsed into '''one file'''.<br>
As an example, if you only want to have filenames ending with a specific type of string (e.g. "-CD1", "-CD2" disregarding the extension) collapsed into '''one file'''. Then you would do the following changes in [[AdvancedSettings.xml]].


The various formats can be summarized by the following:
<xml>
<advancedsettings>
  <moviestacking append="no">
    <regexp>[ _\.-]+cd[ _\.-]*([0-9a-d]+)</regexp>
    <regexp>[ _\.-]+dvd[ _\.-]*([0-9a-d]+)</regexp>
    <regexp>[ _\.-]+part[ _\.-]*([0-9a-d]+)</regexp>
  </moviestacking>
</advancedsettings>
</xml>


'''[token][cd|part][num]'''
The syntax can be summarized by the following:
 
'''[token][cd|part|dvd][num]'''


Where [token] is one of the following strings:
Where [token] is one of the following strings:
Line 15: Line 32:
*"." (dot)
*"." (dot)


Followed by the string "cd" or "part" '''(case insensitive)'''.
Followed by the string "cd", "part"  or "dvd" '''(case insensitive)'''.


[num] can be a number between 1 and 99.
[num] can be a number between 1 and 99.


The comparison is case insensitive.
The comparison is case insensitive.


For example, if you have the following two files (which both consist of a part of a movie):
For example, if you have the following two files (which both consist of a part of a movie):
Line 28: Line 44:


They will be displayed in the file list as one file '''MyVideo.avi'''.
They will be displayed in the file list as one file '''MyVideo.avi'''.
[[category:Customization]]
[[category:Settings]]
[[category:Usage]]
[[category:Usage]]

Revision as of 23:48, 20 May 2007

When in File Mode, XBMC has the ability to recognize and present 'multi-part' video files based on filename stacking rules. For example a two part VCD can be displayed and played as a single file in the user interface.

Stacking in XBMC

Stacking can be toggled on / off while in File Mode in My Videos. How stacked files are presented to the user can be configured with the Treat Stacked Files as a Single File under Video Setings. The default stacking rules are rather "wide" and can cause files you normally would not want to stack to be stacked (e.g. rolling filenames from digital cameras, TV shows etc.) The regular expressions that control stacking can be changed by the moviestacking tag in AdvancedSettings.xml.

Stacking is only available for video media.

Stacking Filename Syntax

As an example, if you only want to have filenames ending with a specific type of string (e.g. "-CD1", "-CD2" disregarding the extension) collapsed into one file. Then you would do the following changes in AdvancedSettings.xml.

<xml>

<advancedsettings>
 <moviestacking append="no">
   <regexp>[ _\.-]+cd[ _\.-]*([0-9a-d]+)</regexp>
   <regexp>[ _\.-]+dvd[ _\.-]*([0-9a-d]+)</regexp>
   <regexp>[ _\.-]+part[ _\.-]*([0-9a-d]+)</regexp>
 </moviestacking>
</advancedsettings>

</xml>

The syntax can be summarized by the following:

[token][cd|part|dvd][num]

Where [token] is one of the following strings:

  • "-" (hyphen)
  • " " (blank)
  • "_" (underscore)
  • "." (dot)

Followed by the string "cd", "part" or "dvd" (case insensitive).

[num] can be a number between 1 and 99.

The comparison is case insensitive.

For example, if you have the following two files (which both consist of a part of a movie):

  • MyVideo-CD1.avi
  • MyVideo-CD2.avi

They will be displayed in the file list as one file MyVideo.avi.