Skip to content

implement different types of LyricsProviders #2

@pschichtel

Description

@pschichtel

Currently the plugin only supports static access of websites, but many websites require to search for the songs as the URLs contain IDs.
Also there are websites that provide public APIs where we don''t need complicated and error prune content processing.

implementation ideas:

public interface LyricsProviderFactory<T extends LyricsProvider>
{
    T newLyricsProvider(YamlMappingNode configuration);
}
name: 'xy-lyrics.com'
type: 'static'
config:
    url: 'blabla'
    pattern: '<div>(?<lyrics>.*?)</div>'
    filters:
    - filter_a
    - filter_b
name: 'xy-lyrics-search.com'
type: 'search'
config:
    search-url: 'blabla'
    url-pattern: '<a href="(?<url>.*?)">{artist}-{name}'
    filters:
    - filter_a
    - filter_b
name: 'api.xy-lyrics.com'
type: 'api'
config:
    url: 'http://api.lyrics.tld/v3/lyrics/{artist}/{title}'
    data-path: 'lyrics.text'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions