Skip to content

Commit

Permalink
tidy vimeo plugin and add test links
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mm0 committed Oct 30, 2011
1 parent f7198ca commit d21db29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions plugin.video.t0mm0.test/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@
{'title': 'vidxden url'})
addon.add_video_item({'host': 'vidxden.com', 'media_id': 'rn3h4gbh5se7'},
{'title': 'vidxden media id'})
addon.add_video_item({'url': 'http://www.vimeo.com/30081785'},
{'title': 'vimeo url'})
addon.add_video_item({'host': 'vimeo.com', 'media_id': '30081785'},
{'title': 'vimeo media id'})
addon.add_video_item({'url': 'http://www.youtube.com/watch?v=Q3VJOl_XeGs'},
{'title': 'youtube url'})
addon.add_video_item({'host': 'youtube.com', 'media_id': 'Q3VJOl_XeGs'},
Expand Down
4 changes: 2 additions & 2 deletions script.module.urlresolver/lib/urlresolver/plugins/vimeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def get_host_and_id(self, url):


def valid_url(self, url, host):
return re.match('http://(www.)?vimeo.com/[0-9]+',
url)
return re.match('http://(.+)?vimeo.com/[0-9]+',
url) or 'vimeo' in host

def get_settings_xml(self):
xml = PluginSettings.get_settings_xml(self)
Expand Down

0 comments on commit d21db29

Please sign in to comment.