(self)
return totals
Returns a list of totals of each type of media in the application and total matches.
Returns a list of totals of each type of media in the application and total matches.
Returns a list of totals of each type of media in the application and total matches .
def get_reference_totals(self):
        """
            Returns a list of totals of each type of media in the application and total matches.
        """
        totals = []
        for mm in [CommCareMultimedia.get_doc_class(t) for t in CommCareMultimedia.get_doc_types()]:
            paths = self.get_all_paths_of_type(mm.__name__)
            matched_paths = [p for p in self.multimedia_map.keys() if p in paths]
            if len(paths) > 0:
                totals.append({
                    'media_type': mm.get_nice_name(),
                    'totals': len(paths),
                    'matched': len(matched_paths),
                    'icon_class': mm.get_icon_class(),
                    'paths': matched_paths,
                })
        return totals
def get_reference_totals ( self ) : totals = [ ] for mm in [ CommCareMultimedia . get_doc_class ( t ) for t in CommCareMultimedia . get_doc_types ( ) ] : paths = self . get_all_paths_of_type ( mm . __name__ ) matched_paths = [ p for p in self . multimedia_map . keys ( ) if p in paths ] if len ( paths ) > 0 : totals . append ( { 'media_type' : mm . get_nice_name ( ) , 'totals' : len ( paths ) , 'matched' : len ( matched_paths ) , 'icon_class' : mm . get_icon_class ( ) , 'paths' : matched_paths , } ) return totals