Implementing the -CDn stacking schema - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+--- Thread: Implementing the -CDn stacking schema (/showthread.php?tid=6042)
- gglaze - 2004-09-22 11:08
hi, i have decided to go ahead and try implementing a patch for the -cdn stacking schema (like in xbmp). this has been requested in a few threads on the features forum, such as this one.
i've already made a good chunk of the necessary code modifications, and i believe i can have it cleaned up and ready to submit by the end of the week.
the functionality i have in mind includes the following:
* new option under settings to select stacking style : "fuzzy" or "simple" - default to "fuzzy"
* logic in the stacking logic (cguiwindowvideo::update) to branch for fuzzy or simple stacking, using logic for "-cdn" matching in the case of simple stacking, and working essentially as it did before in the case of fuzzy.
* logic in the display of file names to strip out the "-cdn" extensions in the case that simple stacking is turned on.
* logic in the video selection code (cguiwindowvideo::onclick) to handle the stacking mode and correctly get the appropriate list of stacked files.
* if i get really ambitious, an additional "clean video file names" option, with cleaning logic similar to what existed in xbmp. this will remove extensions at the end of the file, such as " - xvid_ac3_polo", and will also clean up things like recognizing files where '.' or '_' has been used instead of ' '.
if anyone has already started working on this, or if there is anything in particular i should know before proceeding, please let me know. thanks!
- jmarshall - 2004-09-22 11:55
the only thing i can think of is that there is currently already facility for removing extensions, so you could probably add your cleanup code there.
great to see a new patch submission. will be added immediately after 1.1 is released, assuming it works + is coded nicely ofcourse
- Gamester17 - 2004-09-22 12:43
just a note and reminder that you want/need to implement xbmp's "cdx" staching before you can add a "remove cdx extention" option:
bring back xbmp's style of multi-stacking or both? option to only stack _cdx & -cdx & .cdx (link) + remember to make it case insensitive.
some (3) xbmp code patches:
btw, if i could request a extended function/feature of this it would be to make the "simple-stacking" configurable via an .xml file;
so power-users can personlize like add or remove ends to stack. ex:cd#, -cd#, _cd#, - cd # and/or part#, -part#, _part#, - part #
ps! personly i would prefer if the default was "simple-stacking" (xbmp-style), rather than "fuzzy-stacking" (xbmc-style) option
- gglaze - 2004-09-22 15:22
thanks, i will try to follow your suggestions. i've already finished the implementation of the xbmp-style stacking, and am now working on cleaning up the display names, and on supporting the various configurable options. case insensitive is also already done. i will try to implement the level of customization in the xml file as you describe.
the xbmp patch links are very helpful, thanks.
i would also personally like the "simple-stacking" to be the default, but since this is my first patch, i don't want to rock the boat, so for now i'll try to leave the software working exactly as it did before the modifications (by default).
- jmarshall - 2004-09-22 15:37
just trying to think of the best interface for allowing the "keyword" for simple stacking to be changed.
i'm loathed to add stuff to xboxmediacenter.xml that doesn't need to be there, but at the same time loath adding stuff to the gui that is unnecessary. perhaps just add it into settings.xml (in the tdata dir) with sensible defaults. then power users can add what they like, and noob's won't be tempted to muck around with it and stuff things up
a block such as:
- gglaze - 2004-09-22 16:01
that could work...
but wouldn't it be possible/acceptable to put it in xboxmediacenter.xml, but not required - i.e. if it is left out, go with the hardcoded default?
i haven't spent much time looking at how the settings are stored/loaded yet.
- jmarshall - 2004-09-22 16:12
yes, it is ofcourse possible. i was just thinking that if it's in settings.xml then it's just 1 step away from the gui.
we're trying to move anything that can be moved out of xboxmediacenter.xml, as it is when editting this that most noobs have issues.
but i don't really mind either way - where the setting is stored is trivial in the grand scheme of things.
- Gamester17 - 2004-09-22 16:34
yes, please do not put it in xboxmediacenter.xml, either put it in a new separate xml (stacking.xml) or put it in settings.xml
be good if could have it so that do not mix the different stacking filters, so for example to not stack "cd#" with "part#", ex:
<stackfilter>-cd#,_cd#, cd#, - cd#, -cd #,_cd #, cd #, - cd #</stackfilter>
<stackfilter>-part#,_part#, part#, - part#, -part #,_part #, part #, - part #</stackfilter>
(so can have more than one filter and do not mix the different filters with each other).
plus maybe something like (probebely make this remove filter case sensitive though?):
...if so then also make it remove any spaces between the last character and the dot (".") before the file-extention.
also keep in mind the numbering of stacked files, ex:
note! this all needs only be done only in the gui becuase if there is a subtitle file present that won't work if name is not same!
- gglaze - 2004-09-22 16:40
sounds good, i'll try to go with settings.xml then. definitely understand the issues with noobs and the simplicity of the main xml file.
thanks for all the tips - already considered a lot of these issues, such as the various number formats, etc. i'll try to make sure i've covered everything, and also offered enough configurability.
- Jazkal - 2004-10-28 17:22
anyone know where this is? did it get added to 1.1?