PDA

View Full Version : Default stacking expressions - what do YOU use to stack your movies?


jmarshall
2008-02-26, 01:48
Hi there,

We are currently reviewing the default regular expressions used to define when to stack multipart video files into a single file.

It is proposed that we reduce the default regexps down to these 3.


<regexp>[ _\.-]+cd[ _\.-]*([0-9a-d]+)</regexp>
<regexp>[ _\.-]+dvd[ _\.-]*([0-9a-d]+)</regexp>
<regexp>[ _\.-]+part[ _\.-]*([0-9a-d]+)</regexp>


Ofcourse they'll still be overrideable via advancedsettings.xml.

These essentially match the following scheme:

<moviename><separater><cd/dvd/part><optional separator><number/letter>

eg

Die Hard - cd 1.avi
Die Hard - cd 2.avi

Note that

Die Hard 2.avi

is NOT matched by the above.

Before we go and unilaterally change this, it'd be appreciated if you could provide input as to what system (if any) you use. Example filenames are fine.

Towards the end of the week we'll make an assessment of any input received and make the change.

Thanks,
Jonathan

agathorn
2008-02-26, 01:55
Took a quick look at my movies, and all my stuff appears to be like this:

In The Name of the King - Part 1 - R5 Line.avi

OR

Tin Man - Part 1.avi

Which if I understand you properly would work just fine under the proposed system.

snoxbox
2008-02-26, 02:04
I adopted a system of:

MovieName Pt1.avi
MovieName Pt2.avi

when I started building my collection, and have since stuck with it.

topfs2
2008-02-27, 12:40
All of mine are
Moviename CD1.avi
Moviename CD2.avi

skunkm0nkee
2008-02-27, 13:37
Yep, mine are

Moviename-cd1.avi
Moviename-cd2.avi

Gamester17
2008-02-27, 16:26
I use:
Moviename.CD1.avi
Moviename.CD2.avi

finas
2008-02-27, 18:21
I always use:

Movie_Name_notes_CDx.avi

for instance:

Folder name: Movie_Name;
Movie_Name_CD1.avi
Movie_Name_CD2.avi

or

Folder Name: Movie_Name_UNRATED
Movie_Name_UNRATED_CD1.avi
Movie_Name_UNRATED_CD2.avi

SandmanCL
2008-02-29, 07:38
Mine are exclusively named
Moviename - cd 1.avi
Moviename - cd 2.avi

anoobie
2008-03-03, 02:37
I use:
Moviename.cd1.avi
Moviename.cd2.avi

snappz
2008-03-03, 02:53
I have a couple named
filename.0001.ts
filename.0002.ts
etc

SleepyP
2008-03-03, 20:04
Movie Name-CD1
Movie Name-CD2
When I am too lazy to join them.

Jetaray
2008-03-04, 04:50
I use:

Movie Name.cd1.xxx
Movie Name.cd2.xxx

As a user only, the three listed seem just fine as a default.

Nick8888
2008-03-04, 05:33
Movie Name CD1
Movie Name CD2

SleepyP
2008-03-04, 06:24
what dorks are we, comparing our file naming schemes? :D

Jezz_X
2008-03-04, 07:00
what dorks are we, comparing our file naming schemes? :D

well I think the whole point is jmarshall wants to strip out some of the older more useless ones and dosn't want to hurt anybody when he does

spiff
2008-03-04, 11:14
please reactive your sense of humor jezz ;)

timdog82001
2008-03-12, 21:05
I use MovieName - Part 1 or MovieName - Disc 1, if its a multidisc movie like lord of the rings

djdafreund
2008-03-13, 03:37
I just use 'The Mist-1', 'The Mist-2', but am thinking of using 'The Mist-cd1' and 'The Mist-cd2" instead since it makes more sense that way, and depending on the length of movie title anyway.
If Spiff is telling you to reactivate your sense of humor, that's saying a lot!! LOL

billyad2000
2008-03-17, 18:56
I like this idea, the current stacking scheme is far too wide and I don't usually use stacking because it usually has side-effects and ends up stacking movie sequels for example.

Truth be told 1 or 2 methods would be fine - and whatever they were i'd be happy to convert to what ever methods are being adopted.

wreezig
2008-03-20, 16:05
I use Movie Name 13 - Cd1.avi just as many others.


But I've noticed that no matter wich release of T3CH's builds, or any others for that matter, of XBMC (and with fresh installations) I get that the stacking automaticlly turns off by itself every now and then.

A bit irritating.

agathorn
2008-03-20, 16:13
I use Movie Name 13 - Cd1.avi just as many others.


But I've noticed that no matter wich release of T3CH's builds, or any others for that matter, of XBMC (and with fresh installations) I get that the stacking automaticlly turns off by itself every now and then.

A bit irritating.

In my case its just the opposite. It turns itself on every now and then :p

wreezig
2008-03-22, 04:22
Well, I'm gonna try deleting viewmodes*.db as mentioned in another thread, and see if that helps.
But it's obviously an issue with the stacking option then.

mappyman
2008-03-23, 03:32
Transformers01.avi
Transformers02.avi

Who uses CDs to store stuff nowadays anyway ? I use DVDs :)

Anyway the latest build does not work and freezes.

plex
2008-03-25, 10:46
the problem is the part identifier can come not only at the end of the string:
name part 1
can be:
name part 1 (text)

That's a simple example. Still relatively easy to match these part identifiers in the middle as well.. The point is to not match what is not a part ID.
like 1/2, 1/3 is a part ID

I foresee some complications with these types of part ids with episodes from tv shows..
they usually use the mulitplication symbol though

The point is.. You can explicitly list out different part id's to match, and then take advantage of negative lookbehinds, positive lookaheads.. etc.. to make sure its not what you don't want... I think this is the best route.

plex
2008-03-25, 10:52
Show me some examples of strings that conflict with the part identifiers, like 01..1/3 etc..

Here is a simple examp:
(?P<start>.*?)(?P<part>(?:\d+/\d+|part\s*\d+\s*of\s*\d+|part\s*\d+/\d+|part\s*\d+))(?P<end>.*)

i modifier
s modifier

plex
2008-03-25, 11:13
I wish I could edit posts :(
This pattern matches most part string identifiers, except just plain numbers as that would be problematic, well it depends on the logic you use once you identify part identifiers.. This logic I don't know and you haven't shared..

It really depends on what you're doing.. Anways, it encompasses most examples provided in this thread:
(?:|[-\s\.])(?P<partStr>\d+/\d+|(?:part|cd|pt|disc|dvd)\s*\d+\s*of\s*\d+|(?:pa rt|cd|pt|disc|dvd)\s*\d+/\d+|(?:part|cd|pt|disc|dvd)\s*\d+)(?:|[-\s\.])
With i modifier ON

Tested in PHP's PCRE engine (which for this pattern is verbatim syntax as python):
http://nancywalshee03.freehostia.com/regextester/regex_tester.php?seeSaved=2bg4cytw

willers.nail
2008-03-25, 21:54
I use the same as what everyone else is using so no probs if ye wanna make a change.

e.g.

XXXX.cd1.avi
XXXX.cd2.avi

Gamester17
2008-03-25, 22:38
Transformers01.avi
Transformers02.aviI can tell you right away that naming files you do now will never be a default stacking expressions in XBMC, it just has to contain a hyphen, a space, a underscore, a dot, or some other [token character between the numbers and the movie-name in order for it to be a standard for stacking.

Today for example the accepted default [tokens] are one of the following strings:

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

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

Like for example:

Transformers-part1.avi (or Transformers part1.avi, or Transformers_part1.avi, or Transformers.part1.avi)
which is stacked with
Transformers-part2.avi (or Transformers part2.avi, or Transformers_part2.avi, or Transformers.part2.avi)

http://xbmc.org/wiki/?title=Stacking

agathorn
2008-03-25, 22:39
Just curious if this has heppend yet or not? Havent' noticed anythign in the changelogs.

I'm still having issues with movie sequels getting stacked and enxious for this :)

plex
2008-03-26, 05:43
Today for example the accepted default [tokens] are one of the following strings:

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

What! You're telling me nobody on team xbmc can come up with an algorithim or regex pattern to handle real world situations? Like: "transformers01.avi" etc..
C'mon you can do better than that!

Also on cd, dvd, you should add: pt, title as well

plex
2008-03-26, 05:46
You should also change use \s to refer to spaces, because it is possible to use tabs in filenames as well.

agathorn
2008-03-26, 05:58
What! You're telling me nobody on team xbmc can come up with an algorithim or regex pattern to handle real world situations? Like: "transformers01.avi" etc..
C'mon you can do better than that!

Also on cd, dvd, you should add: pt, title as well

Whats the difference between:

transformers01.avi, transformers01.avi
and
oceans11.avi, oceans12.avi, oceans13.avi

??

Nick8888
2008-03-26, 06:08
What! You're telling me nobody on team xbmc can come up with an algorithim or regex pattern to handle real world situations? Like: "transformers01.avi" etc..
C'mon you can do better than that!

Also on cd, dvd, you should add: pt, title as well

Possible? Probably. However i think it would be alot easier and save a lot of time if you were just to change your filenaming scheme. As this thread has established, you are alone and most other people are using CD1, part1 dvd1 etc.

mappyman
2008-03-26, 19:58
OK so I will change to use a scheme like:

transformers_01.avi
transformers_02.avi

Should be ok? :;):

Nick8888
2008-03-27, 03:42
I'm not sure if the devs will support that one either.
If I were you I would be safe and change them to include cd part or dvd. I'm not really sure why you dont want to do this as it would be invisible to you anyway once you enable stacking and it saves the confusion which agathorn talked about up there^^

plex
2008-03-27, 05:35
where would the code that handles stacking be in SVN directory?
Also, what library and flavor do you run these regular expressions? Is it PCRE library with c++?

jmarshall
2008-03-27, 07:37
Default expressions are at the top of Settings.cpp

Stacking is done in CFileItemList::Stack().

And yes, we use PCRE.

plex
2008-03-27, 14:14
Possible? Probably. However i think it would be alot easier and save a lot of time if you were just to change your filenaming scheme. As this thread has established, you are alone and most other people are using CD1, part1 dvd1 etc.



I never said I used that naming scheme nick. :)
I disagree with you fundamentally. Computers should conform to humans, not the other way around. There's also always room for improvement.

Well, it was challenging and I came up with something better, like what I was talking about. You can see a demonstration and learn about it here on this thread:
http://xbmc.org/forum/showthread.php?t=32221


And yes that's a good point agathorn, ocean 12, 13 are different movies and realistically should not be stacked. I figured out a way to still have the cake and eat as well, with strict mode.

mappyman
2008-03-28, 01:04
Ocean's Eleven
Ocean's Twelve
Ocean's Thirteen

Are what they are offically called :)

Anyway the point is I have already burnt DVDs with files using those schemes and are you telling me the stacking feature cant handle that simple expression ?

Gamester17
2008-03-28, 11:51
Anyway the point is I have already burnt DVDs with files using those schemes and are you telling me the stacking feature cant handle that simple expression ?We are saying that the DEFAULT stacking expression will not handle it today (nor tomorrow).

Note that this topic-thread is only about the DEFAULT 'out-of-the-box' stacking expression.

YOU can of course later edit the stacking expression on YOUR machine to whetever, see:
http://xbmc.org/wiki/?title=Stacking
http://xbmc.org/wiki/?title=Advancedsettings.xml

DCJoeDog
2008-03-30, 22:05
Moviename CD01.avi
Moviename CD02.avi

buzzra
2008-06-04, 18:09
I use the following naming scheme:

moviename-1.avi
moviename-2.avi

Stacking isn't working anymore, so I guess I'll have to come up with a regex that will match this. A while ago, I went through my collection and TOOK OUT all unnecessary characters such as CD DVD and part. These are FILES not CDs or DVDs and if I have a -2 after a filename that is OBVIOUSLY part2. Silly to force users to change their naming scheme. As pointed out above, using the REAL movie names, I have never had a problem with sequels getting stacked. That's what you should force people to do.

jmarshall
2008-06-04, 23:31
We use common sense. Common sense says many sequels are named <moviename> 2, so we don't stack 'em by default.

It's not silly to make sure that default regexps do NOT stack sequels, which is what we did. Feel free to suggest a set of alternative default expressions that also meet this criteria.

Cheers,
Jonathan

buzzra
2008-06-05, 03:24
Luckily the old defaults are sill in the wiki. I just put them in advanced settings.xml and everything is back to normal. :)
That's what makes XBMC great. Thanks for all the hard work on "The project most likely to change the world"!:grin:

dteirney
2008-06-09, 12:43
The Green Mile - 1.avi
The Green Mile - 2.avi
The Godfather Part II - 1.avi
The Godfather Part II - 2.avi
Weekend at Bernies - 1.avi
Weekend at Bernies - 2.avi
Weekend at Bernies - 3.avi

This used to work ages ago so I was wondering why it didn't anymore.

What are the current rules for stacking? It wasn't clear in http://xbmc.org/wiki/?title=Stacking as it just seemed to mention what you could change it to in AdvancedSettings.xml if you wanted to.

dteirney
2008-06-09, 13:44
What are the current rules for stacking? It wasn't clear in http://xbmc.org/wiki/?title=Stacking as it just seemed to mention what you could change it to in AdvancedSettings.xml if you wanted to.

Found them at http://xbmc.org/wiki/?title=Advancedsettings.xml#.3Cmoviestacking.3E. I'm assuming they are up-to-date as some quick tests don't match the file naming convention I'm using.

I'm using the following in the AdvancedSettings.xml file to match a naming convention that looks like
Weekend at Bernies 2 - 1.avi
Weekend at Bernies 2 - 2.avi


<moviestacking append="yes">
<!-- To deal with my Moviename - n naming convention -->
<regexp> *- *([0-9]+)$</regexp>
</moviestacking>

dteirney
2008-06-09, 14:23
I'm using the following in the AdvancedSettings.xml file to match a naming convention that looks like
Weekend at Bernies 2 - 1.avi
Weekend at Bernies 2 - 2.avi


Should of known to test on the XBox first. The RegEx tester I was using wasn't using the right engine, and XBMC passes the whole filename (including the extension). The following works:

<moviestacking append="yes">
<!-- To deal with my Movie - n naming convention -->
<regexp>[ ]*-[ ]*([0-9]+)</regexp>
</moviestacking>


Looks like you have to manually remove the old library entries that are covered by the new stacking rules because I now have an additional entry in the library for each stacked movie. Clean Library didn't help to remove them.

plooger
2008-06-19, 14:05
Your new suggested defaults seem reasonable, to avoid default overstacking; especially since the user is free to add custom stacking rules to handle any personal preferences.

For example, I like to tag my multipart episodes with a "Part M of N" format, just to make it obvious if/when I've lost a piece; but to enable this, I have to override the default stacking (otherwise it takes precedence).
<moviestacking append="no">
<regexp>[\s_\.-]+(?:cd|dvd|part|disc|pt)[\s_\.-]*([0-9a-d]+)[\s_\.-]*of*[\s_\.-]*[0-9a-d]+</regexp>
<regexp>[\s_\.-]+(?:cd|dvd|part|disc|pt)[\s_\.-]*([0-9a-d]+)</regexp>
</moviestacking>But seeing some of the other comments in this thread, I may start enclosing my multipart identifiers with some other characters to avoid accidental stacking.

I don't know if this has been pondered, but would it make sense to allow the user to "prepend" to the default stacking rules, rather than only having the option to overwrite or append?

kraqh3d
2008-06-19, 15:12
allowing the user to have their custom ones prepended to the list is a good idea. the regexps are processed in order with the default ones taking precedence. Xbmc stops after it finds the first one that produces a match.

plooger
2008-06-19, 15:35
allowing the user to have their custom one prepended to the list is a good idea. the regexps are processed in order with the default ones taking precedence. Xbmc stops after it finds the first one that produces a match.
Yeah, I learned that through experience (though it should have been obvious in the first place), when my "yada - Part M of N.iso" multiparts were being displayed as "yada of N.iso."

I'd put my "M of N" handler regexp at the top of my custom REs, but failed to account for the defaults. :eek:

Hippo
2008-07-11, 16:15
Okay, here's a new one. I found last night that my copies of "21' and "300" were being stacked. Looks like I need a way to stack only consecutively named files. Anybody else having this prob?

kraqh3d
2008-07-11, 17:48
Hmm I think you're getting trapped by this regexp:
()[^ _\.-]+([0-9]+)(\....)$

This means you have to have atleast one number preceeded by atleast one character which is NOT space or underscore or period or minus. I believe the leading folder separater slash is qualifying for that NOT clause. This should get changed.

Also, while I'm at it, we have two which require an extension (\....)$ on the end. This should be (\.....?)$ because some video extensions are four characters.

SandmanCL
2008-07-11, 23:13
These very same movies got stacked for me as well. I got around the problem by turning off stacking and manually looking up the info for each one each one (300.avi and 21.avi)