[weboob] [weboob - Feature #403] ICapVideo may support paths

Nicolas Duhamel nicolas.duhamel2 at gmail.com
Thu Nov 18 08:28:07 CET 2010


 On Wed, 17 Nov 2010 22:29:11 +0100,  wrote:
> Issue #403 has been updated by Romain Bignon.
>
>
> I have several questions.
>
>
> Firstly, why have you written @weboob.tools.path@ which is really
> similar to @os.path@? I don't think there are lot of new things in
> this module

 weboob.tools.path comes from an other python project (i need to change 
 the
 licence). I agree there is'nt lot of new things, but it introduce the 
 object
 PathMap which is very convenient to manipulate path. This file need to 
 be
 rewrite.


> Also, I don't know if you have read the discussion on mailing list,
> but it is not really what we wanted to do.
>
> What we have decided was to keep the state client-side
 There is now state save for now, paths are auto-discover by the 
 backend.

> and to define
> a method like @get_path_node(path)@ which returns a list of subnodes
> if this is a _directory_, or a CapBaseObject if this is a _file_.

 Actually, set_path(path) return to iterator the first on the subpath,
 the second on the path's content.


>
> Then, the application (for example videoob) know that this object is
> a Video instance and can play it.

> Other methods like @search@ are not
> impacted by the position in the path.
 They are'nt

 
> Perhaps we are wrong, but I would like you answer on mailing list to
> know your opinion.

 En français,

> Firstly, why have you written @weboob.tools.path@ which is really
> similar to @os.path@? I don't think there are lot of new things in
> this module

 L'objet PathMap est le seul intérêt de ce fichier, il permet de gérer 
 facilement les paths.
 Ce fichier est emprunté à un autre projet python (je dois corriger la 
 licence) et doit être
 réécrit.

 
> Also, I don't know if you have read the discussion on mailing list,
> but it is not really what we wanted to do.
>
> What we have decided was to keep the state client-side

 Je ne vois pas ou est le problème ici, je ne sauvegarde rien au niveau 
 du backend,
 peut être la confusion vient-elle de la particularité de cannalplus de 
 nous servir
 dans un plateau l'intégralité de ces catégories en un seul fichier XML.

> and to define
> a method like @get_path_node(path)@ which returns a list of subnodes
> if this is a _directory_, or a CapBaseObject if this is a _file_.

 Encore une fois je ne vois pas le problème, pour l'instant une fonction
 set_path(path) est définie et retourne deux iterateurs le premier sur 
 les
 subpaths le second sur le contenu du path.


> Then, the application (for example videoob) know that this object is
> a Video instance and can play it.

> Other methods like @search@ are not
> impacted by the position in the path.
 Dans l'état actuel des choses l'implantation de ICapPath, ne change
 absolument rien pour ces fonctions.


 Je vais implanter ICapPath dans mon backend AlloshowTv qui ne peut
 être utilisé que si on intègre cette notion de path. Ainsi nous aurons
 un meilleur exemple, pour discuter.

 Nicolas



>
> ----------------------------------------
> Feature #403: ICapVideo may support paths
> https://symlink.me/issues/403
>
> Author: Romain Bignon
> Status: In progress
> Priority: Normal
> Assigned to: Nicolas Duhamel
> Category: Core / Capabilities
> Target version: 0.4
> Branch:
>
>
> To support catogories/tags/seasons/episodes/channels/programs/etc.
> which are different in every backends, we should add a concept with
> hierarchy that backends should implement.




More information about the weboob mailing list