Logo Search packages:      
Sourcecode: lazygal version File versions  Download package

def lazygal::metadata::DirectoryMetadata::get (   self,
  subdir = None 
)
Returns directory meta data. First tries to parse known formats
and then fall backs to built in defaults.

Definition at line 285 of file metadata.py.

                                :
        '''
        Returns directory meta data. First tries to parse known formats
        and then fall backs to built in defaults.
        '''

        result = {}

        try:
            result = self.get_matew_metadata(result, subdir)
        except NoMetadata:
            pass

        # Add album picture
        if not result.has_key('album_picture'):
            picture = self.dir.guess_directory_picture(subdir)
            if picture is not None:
                result['album_picture'] = picture

        if result.has_key('album_picture'):
            # Convert to thumbnail path
            filename, extension = os.path.splitext(result['album_picture'])
            result['album_picture'] = self.dir.get_osize_name_noext('thumb', filename) + extension

        return result


# vim: ts=4 sw=4 expandtab

Generated by  Doxygen 1.6.0   Back to index