Code review comment for lp:~joshuascotton/entertainer/entertainer-changes

Revision history for this message
Joshua Scotton (joshuascotton) wrote :

video_cache.py uses the __SUPPORTED_FILE_EXTENSIONS list to work out whether to index a file as a video file in lines 70-73 of video_cache.py:
           if not self.isFileInCache(filename) and \
                self.isSupportedFormat(filename):
                try:
                    self._addVideoFile(filename)

Hence, all you need to do to add a gstreamer supported filetype as an entertainer supported filetype is to add the extension to the __SUPPORTED_FILE_EXTENSIONS list.

I'm wondering whether there's an automated way to generate the __SUPPORTED_FILE_EXTENSIONS list in the first place, but in the meantime I've added mp4 and m4v because I know that they both work in entertainer with this change.

Music cache also has a similar list, currently:
 __SUPPORTED_FILE_EXTENSIONS = ['mp3', 'ogg']

and pictures:
SUPPORTED_FILE_EXTENSIONS = ['jpg', 'jpeg']

« Back to merge proposal