Implementing the -CDn stacking schema

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
gglaze Offline
Senior Member
Posts: 109
Joined: Sep 2004
Reputation: 0
Post: #1
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!
Cool

read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,669
Joined: Oct 2003
Reputation: 169
Post: #2
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 Smile

cheers,
jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 9
Location: Sweden
Thumbs Up   
Post: #3
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:
http://sourceforge.net/tracker....=691679
http://sourceforge.net/tracker....=691945
http://sourceforge.net/tracker....=798057

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 Wink

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
gglaze Offline
Senior Member
Posts: 109
Joined: Sep 2004
Reputation: 0
Post: #4
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).

read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,669
Joined: Oct 2003
Reputation: 169
Post: #5
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 Smile

a block such as:

<stackfilters>-cd#,_cd#,_part#</stackfilters>

maybe??

cheers,
jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
gglaze Offline
Senior Member
Posts: 109
Joined: Sep 2004
Reputation: 0
Post: #6
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.

read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,669
Joined: Oct 2003
Reputation: 169
Post: #7
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.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 9
Location: Sweden
Exclamation   
Post: #8
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?):
<removefilter>ac3,dts,xvid,divx,xvid,divx,rmvb<removefilter>
...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:
1
2
3
4

or:

01
02
03
04

or:

1
01
2
02
3
03
4
04


and not!:
01
11
02
20
03
30

nor!:
1
11
2
3

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!

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
gglaze Offline
Senior Member
Posts: 109
Joined: Sep 2004
Reputation: 0
Post: #9
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.

read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
find quote
Jazkal Offline
Junior Member
Posts: 14
Joined: Jun 2004
Reputation: 0
Post: #10
anyone know where this is? did it get added to 1.1?
find quote
gglaze Offline
Senior Member
Posts: 109
Joined: Sep 2004
Reputation: 0
Post: #11
i just submitted the patch for this to sourceforge. i guess it will be in 1.2 or something?

read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
find quote
wabidwoveren Offline
Senior Member
Posts: 122
Joined: Feb 2004
Reputation: 0
Post: #12
does the current xml use pipelines "|" to seperate terms inside xml? maybe it should stay consistant.

<stack>-cd#,cd#|-part#,part#</stack>

that also fixes gamester's problem of it stacking unmatching cd/part thingies.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,669
Joined: Oct 2003
Reputation: 169
Post: #13
yes, it uses | to separate. currently there is no config in the gui for the things it looks for, but you can manual edit settings.xml ofcourse.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Weavus Offline
Alaska Group
Posts: 346
Joined: Jun 2004
Post: #14
can you give an example of what to put into settings.xml please until a gui is added to a later build? (a whole block of xml would be great)

in my case, all my movies are named with -cd# and nothing else.

will this also stop the problem of tv episodes all being stacked together due to similarity of the names?

thanks for implementing this fantastic feature, i've hated the way xbmc implemented stacking from when it first appeared.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,669
Joined: Oct 2003
Reputation: 169
Post: #15
gglaze did it - thank him.

if you save any other setting (just change a checkbox to on then off) so that it saves the settings to settings.xml then it should be pretty obvious how it works.

the things it uses for stacking are listed there.

the way you have your files at the moment should work fine with the new system without you having to change a thing.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Post Reply