MusicBeePlugin.Plugin.RetrieveLyrics C# (CSharp) Method

RetrieveLyrics() public method

public RetrieveLyrics ( String source, String artist, String title, String album, bool preferSynced, String providerName ) : String
source String
artist String
title String
album String
preferSynced bool
providerName String
return String
        public String RetrieveLyrics(String source, String artist, String title, String album, bool preferSynced, String providerName)
        {
            lyricsReloaded.getLogger().debug("Lyrics request: {0} - {1} - {2} - {3} - {4}", source, artist, title, album, providerName);
            Provider provider = lyricsReloaded.getProviderManager().getProvider(providerName);
            if (provider == null)
            {
                lyricsReloaded.getLogger().warn("The provider {0} was not found!", providerName);
                return null;
            }

            String lyrics = provider.getLyrics(artist, title, album);

            if (String.IsNullOrWhiteSpace(lyrics))
            {
                lyricsReloaded.getLogger().debug("no lyrics found");
                return null;
            }

            lyricsReloaded.getLogger().debug("lyrics found");

            return lyrics;
        }