Collections are not stored in replapplication.objects anymore, but in
replapplication.collections. This fixes the IDs issue. There was no gain
from storing them in objects.
Completion right after cd should be faster (and should always have been
like that, it was pretty much a bug).
The display of do_ls() should be much clearer. Collections are always at
the end, have ids/title/backend like objects (but using a formatter
would be better than my current hack).
There are still many issues with the current implementation.
refs #774closes#785
* 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
When no backends are loaded, a prompt pops up and
suggest to add some.
This patch adds the possibility to select all at once.
Signed-off-by: theo <theocrite@theocrite.org>
Signed-off-by: Romain Bignon <romain@peerfuse.org>
Use stderr and return codes >0 when it makes sense.
Loose return code conventions:
* 1 for generic errors
* 2 for user input errors
* 3 for remote errors (not found, etc.)
* 4 for not implemented
fillobj was only called when getting previously fetched objects in
interactive mode.
This probably wasn't detected because most get_* backend functions
usually fill a lot of fields by themselves.