Identify task (#1839)

* Add identify task
* Change type naming
* Debounce folder select text input
* Add generic slice comparison function
This commit is contained in:
WithoutPants
2021-10-28 14:25:17 +11:00
committed by GitHub
parent c93b5e12b7
commit 0f64954e5b
70 changed files with 5882 additions and 291 deletions

View File

@@ -212,6 +212,16 @@ func (c Cache) ListMovieScrapers() []*models.Scraper {
return ret
}
// GetScraper returns the scraper matching the provided id.
func (c Cache) GetScraper(scraperID string) *models.Scraper {
ret := c.findScraper(scraperID)
if ret != nil {
return ret.Spec
}
return nil
}
func (c Cache) findScraper(scraperID string) *scraper {
for _, s := range c.scrapers {
if s.ID == scraperID {