Prepare for objects that are also Collections

Don't force objects to have an id, especially since that id was
incorrect. "plap/plop" would have the same id as "plop", i.e. "plop".
We don't rely on the id for handling Collections anymore.

Change to use more unique property names.

Change the display, instead of using '*', we use '~', and there is no
"Collection" header anymore.
Updated formatters could use that way of showing the object is also a
collection too.

refs #774
This commit is contained in:
Laurent Bachelier 2012-03-13 13:25:29 +01:00
commit fae4470101
4 changed files with 61 additions and 48 deletions

View file

@ -82,11 +82,11 @@ class CanalplusBrowser(BaseBrowser):
if len(split_path) == 0:
for channel in channels:
if channel.level == 1:
if channel.path_level == 1:
yield channel
elif len(split_path) == 1:
for channel in channels:
if channel.level == 2 and split_path == channel.parent:
if channel.path_level == 2 and split_path == channel.parent_path:
yield channel
elif len(split_path) == 2:
subchannels = self.iter_resources(split_path[0:1])