Skip to content

Commit

Permalink
Fix vimeo.com/channels/ URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Aug 5, 2017
1 parent 8cf2aec commit 6db3d47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Expand Up @@ -260,7 +260,7 @@
response = VimeoParty.get("/videos/#{video_id}")
raise VimeoError.new(response) if !response.success?
user_id = response.parsed_response["user"]["uri"].gsub("/users/","").to_i
elsif /vimeo\.com\/(?<user>[^\/]+)/ =~ params[:q] or user = params[:q]
elsif /vimeo\.com\/(?:channels\/)?(?<user>[^\/]+)/ =~ params[:q] or user = params[:q]
# it's probably a channel name
response = VimeoParty.get("/users", query: { query: user })
raise VimeoError.new(response) if !response.success?
Expand Down

0 comments on commit 6db3d47

Please sign in to comment.