[weekly report] Week 10: Rhythmbox iPod/MTP Syncing



Hi all,
This last week was a big success for me. I successfully implemented syncing and a properties dialog for MTP devices. By switching over the RBMtpSource to be a sub-class of RBMediaPlayerSource, it inherited all the 'sync-ability' of that class, and can now sync easily. However, There is still some code clean-up to do in the RBMtpSource class. The biggest hurdle in implementing the MTP syncing was my flakey MTP player. It would sometimes connect, and sometimes not, and somtimes break transferring things. However, when I compared it back to the Git Master version, and got the same errors there I (with a lot of help from my mentor), managed to trace the error to my device. Other than that, the biggest challenge was getting the capacity and free space of the device (which was not hard, at all). I also implemented a bit of "lazy-loading" style for building the addition/removal lists. With extremely large libraries (say > 70GBs) building the addition/removal list can be processor intensive. Therefore, we don't want to build the same list over and over, when nothing has changed. This avoids building it once when options are selected, and then again when the sync button is pressed.

With syncing working on both iPods and MTP players, I will be revisiting Playlist syncing. Transferring playlists to the device is a bit interesting, because there is a many-to-many relationship between tracks and playlists. Furthermore, there is no direct correlation between the Rhythmbox query model, and the way iPods handle dynamic playlists. To transfer dynamic playlists would need some sort of device-specific converter (which gets dicey on MTP players). So, for now, I will be handling dynamic playlists by converting Rhythmbox's dynamic playlists to static ones, when they are transferred. The part, which I am most "worried" about is an efficient way to establish a correlation between tracks in the library, and tracks on the device.

The other minor issue, which I would like to solve, is how to handle "Sync All Music" and "Sync All Podcasts" options. This week, I am also hoping to implement these options in the Properties panel(s). I am thinking that these options should be checked by default, so that if someone plugs in a device, and hits sync it will automatically begin syncing everything.

Paul Bellamy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]