Make CapCollection understandable and useable by humans
* Make the declaration of fct and it in the constructor Collection, instead of adding them from the outside * Add a function to flatten a list containing collection (solves the radioob search crash) * Better display of collections in the "ls" command (and display both id and title) * The "cd" command goes to the root of the path (like the UNIX cd) * Move the Video object of canalplus in a correct path * Make Collection iterable * Add comments to CapCollection * Cache the result of fct in a Collection; it is only called once * CollectionNotFound errors can be more explicit by providing a path * Require utf-8 in collection paths * Code cleanups
This commit is contained in:
parent
10215d1e4c
commit
682e14c86a
14 changed files with 125 additions and 63 deletions
|
|
@ -64,7 +64,7 @@ class NovaBackend(BaseBackend, ICapRadio, ICapCollection):
|
|||
|
||||
def iter_resources(self, split_path):
|
||||
if len(split_path) > 0:
|
||||
raise CollectionNotFound()
|
||||
raise CollectionNotFound(split_path)
|
||||
|
||||
for id in self._RADIOS.iterkeys():
|
||||
yield self.get_radio(id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue