Le lundi 06 avril 2009 à 16:48 +0200, Krzysztof Adamski a écrit : > Dnia 2009-03-26, czw o godzinie 19:03 +0100, Olivier Tilloy pisze: > > Hi Krzysztof, > > > > That's a quite thorough analysis of the situation! > > As you may have noticed, the slideshow player has been recently > > re-modelled. It is now much better (and, I think, a piece of Elisa we > > can now be proud of). Its API is quite consistent because carefully > > designed, so I think most of the changes you are proposing ought to be > > done in the video/audio player to reflect changes in the slideshow player. > > > > Now, until which point it is relevant to try and unify the two players' > > APIs is another open question. Some methods of the slideshow are for > > example quite specific to a slideshow and don't really fit in a > > video/audio player. > > > > Any concrete proposal of what should be done, or even a design or > > proof-of-concept branch are more than welcome! > Sorry for responding so late. What i would like to do is to make > BasePlayer class that will contain as much of the code that could be > shared between all the players (slideshow and video for now) as > possible. > As a good start i think that the code for handling playlists could be > unified and stored in base class.
Yes, good idea! > It is obvious that all players will have a playlist and operations on > this playlist will be the same: > - set playlist > - clear playlist > - get current item from playlist > - add something to playlist > - remove something from playlist > > The problem is that video player uses PlaylistModel() class while > slideshow uses just normal python lists. Do you think this could be > generalized somehow? Should PlaylistModel be used or just a normal list > in both players? Or maybe you think it's not a good idea to have this > code shared between players? > Well I think we could use the PlaylistModel in the slideshow too. Using simple lists is not an option (at least for audio/video) because some plugins require restrictions on the playlist (like yesfm and grooveshark) so we need the features of the PlaylistModel at least for these (and maybe more plugins in the future). Philippe
