Fix movie ingestion
This commit is contained in:
@@ -9,9 +9,9 @@ module Admin
|
|||||||
def call(movie)
|
def call(movie)
|
||||||
repo = Adamantium::Container["repos.movie_repo"]
|
repo = Adamantium::Container["repos.movie_repo"]
|
||||||
|
|
||||||
return if repo.by_title_and_year(title: title, year: activity.year)
|
return if repo.by_title_and_year(title: movie[:title], year: movie[:year])
|
||||||
|
|
||||||
page = Down.download(activity.film_link)
|
page = Down.download(movie[:url])
|
||||||
match = page.read.match(/href=".+title\/(tt\d+)\/maindetails"/)
|
match = page.read.match(/href=".+title\/(tt\d+)\/maindetails"/)
|
||||||
imdb_id = match[1]
|
imdb_id = match[1]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user