Convenience method for `get_music_library_information`
        with ``search_type='genres'``. For details of other arguments,
        see `that method
        <#soco.music_library.MusicLibrary.get_music_library_information>`_.
505877
def get_genres(self, *args, **kwargs):
        
        args = tuple(['genres'] + list(args))
        return self.get_music_library_information(*args, **kwargs)
130306
def get_favorite_radio_shows(self, *args, **kwargs):
        
        args = tuple(['radio_shows'] + list(args))
        return self.get_music_library_information(*args, **kwargs)
988421
def getSearchUrl(self, album, artist):
    
    params = collections.OrderedDict()
    params["search-alias"] = "popular"
    params["field-artist"] = artist
    params["field-title"] = album
    params["sort"] = "relevancerank"
    return __class__.assembleUrl(self.base_url, params)
981574
def find_by_content_type(content_type):
    
    for format in FORMATS:
        if content_type in format.content_types:
            return format

    raise UnknownFormat('No format found with content type "%s"' % content_type)
701469
def _get_media(media_types):
    """"""
    get_mapped_media = (lambda x: maps.VIRTUAL_MEDIA_TYPES_MAP[x]
                        if x in maps.VIRTUAL_MEDIA_TYPES_MAP else None)
    return list(map(get_mapped_media, media_types))
143605
def media_type_str(mediatype):
    """"""
    if mediatype == const.MEDIA_TYPE_UNKNOWN:
        return 'Unknown'
    if mediatype == const.MEDIA_TYPE_VIDEO:
        return 'Video'
    if mediatype == const.MEDIA_TYPE_MUSIC:
        return 'Music'
    if mediatype == const.MEDIA_TYPE_TV:
        return 'TV'
    return 'Unsupported'
583383
def info(self):
        
        info = self.get_params()
        info.update({'term_type': self._name})
        return info
692577
def search_song(self, title, artist="", get_full_info=True):
        

        # Search the Genius API for the specified song
        if self.verbose:
            if artist:
                print('Searching for "{s}" by {a}...'.format(s=title, a=artist))
            else:
                print('Searching for "{s}"...'.format(s=title))
        search_term = "{s} {a}".format(s=title, a=artist).strip()
        response = self.search_genius_web(search_term)

        # Otherwise, move forward with processing the search results
        result = self._get_item_from_search_response(response, type_="song")

        # Exit search if there were no results returned from API
        if not result:
            if self.verbose:
                print("No results found for: '{s}'".format(s=search_term))
            return None

        # Reject non-songs (Liner notes, track lists, etc.)
        valid = self._result_is_lyrics(result['title']) if self.skip_non_songs else True
        if not valid:
            if self.verbose:
                print('Specified song does not contain lyrics. Rejecting.')
            return None

        # Download full song info (an API call) unless told not to by user
        song_info = result.copy()
        if get_full_info:
            song_info.update(self.get_song(result['id'])['song'])
        lyrics = self._scrape_song_lyrics_from_url(song_info['url'])

        # Skip results when URL is a 404 or lyrics are missing
        if not lyrics:
            if self.verbose:
                print('Specified song does not have a valid URL with lyrics. Rejecting.')
            return None

        # Return a Song object with lyrics if we've made it this far
        song = Song(song_info, lyrics)
        if self.verbose:
            print('Done.')
        return song
267738
def search(self, query):
        
        logger.info("Catalog query={}".format(query))

        # Support to set the catalog as a request parameter
        catalogs = _.to_list(req.get("catalog", None))
        if catalogs:
            return senaiteapi.search(query, catalog=catalogs)
        # Delegate to the search API of Bika LIMS
        return senaiteapi.search(query)
540665
def get_citation_by_reference(self, type: str, reference: str) -> Optional[Citation]:
        """"""
        citation_hash = hash_citation(type=type, reference=reference)
        return self.get_citation_by_hash(citation_hash)
17579
def find_service_by_type(self, service_type):
        
        for service in self._services:
            if service_type == service.type:
                return service
        return None
963957
def volume_info(self, vol=None, type_filter=None):
		''
		vols = yield self(join('volumes', vol))
		if not isinstance(vols, list): vols = [vols]
		if type_filter is not None:
			vols = list(vol for vol in vols if vol['type'] == type_filter)
		if vol is not None: defer.returnValue(vols[0] if vols else None)
		defer.returnValue(vols)
298543
def search(self, search_content, search_type, limit=9):
        

        url = 'http://music.163.com/weapi/cloudsearch/get/web?csrf_token='
        params = {'s': search_content, 'type': search_type, 'offset': 0,
                  'sub': 'false', 'limit': limit}
        result = self.post_request(url, params)
        return result
512787
def get_albums(self, *args, **kwargs):
        
        args = tuple(['albums'] + list(args))
        return self.get_music_library_information(*args, **kwargs)
85569
def explore_genres(self, parent_genre_id=None):
		

		response = self._call(
			mc_calls.ExploreGenres,
			parent_genre_id
		)
		genre_list = response.body.get('genres', [])

		return genre_list
1141983
def get_kbs_info(kbtype="", searchkbname=""):
    
    # query + order by
    query = models.KnwKB.query.order_by(
        models.KnwKB.name)
    # filters
    if kbtype:
        query = query.filter_by(kbtype=kbtype)
    if searchkbname:
        query = query.filter_by(name=searchkbname)

    return [row.to_dict() for row in query.all()]
1100107
@Get("/musics/search")
	public void search(Music music) {
		String title = MoreObjects.firstNonNull(music.getTitle(), "");
        result.include("musics", this.musicDao.searchSimilarTitle(title));
    }