jaylinski / kodi-addon-vimeo Goto Github PK
View Code? Open in Web Editor NEWπ½ Vimeo Add-on for Kodi.
License: MIT License
π½ Vimeo Add-on for Kodi.
License: MIT License
Turns out the API returns purchase items with empty play
objects:
"play": {
"status": "purchase_required"
}
Example: https://vimeo.com/search?q=iceland
Video: https://vimeo.com/ondemand/25096/112739300
Ref: https://forum.kodi.tv/showthread.php?tid=220437&pid=2927380#pid2927380
It would be nice to have a default search filter (suffix).
-trump
us election
us election -trump
Source: https://forum.kodi.tv/showthread.php?tid=220437&pid=2885999#pid2885999
Searches with non-ascii characters will result in the following error:
2020-04-10 07:40:23.358 T:139727991629568 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.UnicodeEncodeError'>
Error Contents: 'ascii' codec can't encode character u'\xfc' in position 2: ordinal not in range(128)
Traceback (most recent call last):
File "/home/osboxes/.kodi/addons/plugin.video.vimeo/addon.py", line 3, in <module>
plugin.run()
File "/home/osboxes/.kodi/addons/plugin.video.vimeo/resources/plugin.py", line 40, in run
args = urllib.parse.parse_qs(sys.argv[2][1:])
File "/home/osboxes/.kodi/addons/script.module.future/libs/future/backports/urllib/parse.py", line 564, in parse_qs
encoding=encoding, errors=errors)
File "/home/osboxes/.kodi/addons/script.module.future/libs/future/backports/urllib/parse.py", line 616, in parse_qsl
value = _coerce_result(value)
File "/home/osboxes/.kodi/addons/script.module.future/libs/future/backports/urllib/parse.py", line 98, in _encode_result
return obj.encode(encoding, errors)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 2: ordinal not in range(128)
-->End of Python script error report<--
Example search string: GrΓΌn
Starting de Vimeo add-on after installation fails with:
2020-07-10 11:00:34.037 T:1224725376 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.SyntaxError'>
Error Contents: 'utf8' codec can't decode byte 0x8a in position 0: invalid start byte (message.py, line 3)
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.vimeo/addon.py", line 1, in <module>
from resources import plugin
File "/storage/.kodi/addons/plugin.video.vimeo/resources/plugin.py", line 3, in <module>
standard_library.install_aliases() # noqa: E402
File "/storage/.kodi/addons/script.module.future/libs/future/standard_library/__init__.py", line 478, in install_aliases
from future.backports.urllib import request
File "/storage/.kodi/addons/script.module.future/libs/future/backports/urllib/request.py", line 97, in <module>
from future.backports.http import client as http_client
File "/storage/.kodi/addons/script.module.future/libs/future/backports/http/client.py", line 76, in <module>
from future.backports.email import parser as email_parser
File "/storage/.kodi/addons/script.module.future/libs/future/backports/email/parser.py", line 15, in <module>
from future.backports.email.feedparser import FeedParser, BytesFeedParser
File "/storage/.kodi/addons/script.module.future/libs/future/backports/email/feedparser.py", line 32, in <module>
from future.backports.email import message
File "/storage/.kodi/addons/script.module.future/libs/future/backports/email/message.py", line 3
SyntaxError: 'utf8' codec can't decode byte 0x8a in position 0: invalid start byte
-->End of Python script error report<--
This is on a Kodi v18.7 running LibreELEC v9.2.3 on a Raspberry Pi 3B.
If 1080p
is set, but it is not available as a Vimeo stream, the plugin takes the first stream from the list (which often has bad quality).
The plugin should select the next best quality instead.
kodi-addon-vimeo/resources/lib/api.py
Lines 348 to 354 in 92ab9f3
By using this script, some of the boilerplate code could be removed.
Like
button if user is logged in
Watch later
button if user is logged in
Should disliking also be supported?
I noticed the plugin crash when trying to play the recording of a finished livestream; the logs says "Api JSON seems to be invalid".
Debugging showed the "type" slot of the result object was "live"
, not "video"
, so I changed this line from
if "type" in json_obj and json_obj["type"] == "video":
to:
if "type" in json_obj and json_obj["type"] in ("video", "live"):
This fixed the issue for me; I can play both ongoing livestreams as well as recordings of past streams.
The info view should display a thumbnail and a title of the video.
It would be great if it would be possible to use the video on demand service by vimeo (including buying)
Thanks
If i have time i will search a bit but i do not have experience with kodi/paying
I am interested to call a channel from another add-on. We already do this for YouTube where our VOD channels are enhanced by linking to the broadcaster's YouTube content. We now have the same need for Vimeo content from one specific broadcaster.
Is there any documentation on how to call the Vimeo add-on from another add-on to perform certain tasks?
In our own add-on we documented this in the Wiki like this.
Vimeo supports subtitles and those should be available in Kodi.
The plugin should be tested with a Kodi Python 3 test build.
Currently blocked by xbmc/xbmc#16116. (Kodi 19 still ships with Python 2.7 and there are no Python 3 builds for Ubuntu 18.04.)
When settings are set to 720p, addon will still play at whatever the highest resolution the video is available in.
Even if the inputstream addon is also set to 720p, vimeo addon will still play at 4k if video is available at 4k.
When you add a video with JSON-RPC, the video is duplicated in the playlist.
curl -d '{ "jsonrpc": "2.0", "method": "Playlist.Clear", "params": { "playlistid": 1 }, "id": 1 }' -H 'Content-type: application/json' -X POST 127.0.0.1:8080/jsonrpc
{ "id": 1, "jsonrpc": "2.0", "result": "OK" }
curl -d '{ "jsonrpc": "2.0", "method": "Playlist.Add", "params": { "playlistid": 1, "item": { "file": "plugin://plugin.video.vimeo/play/?video_id=306834650" } }, "id": 2 }' -H 'Content-type: application/json' -X POST 127.0.0.1:8080/jsonrpc
{ "id": 2, "jsonrpc": "2.0", "result": "OK" }
curl -d '{ "jsonrpc": "2.0", "method": "Playlist.GetItems", "params": { "playlistid": 1, "properties": ["file"] }, "id": 3 }' -H 'Content-type: application/json' -X POST 127.0.0.1:8080/jsonrpc
{
"id": 3,
"jsonrpc": "2.0",
"result": {
"items": [{
"file": "plugin://plugin.video.vimeo/play/?video_id=306834650",
"label": "play",
"type": "unknown"
}],
"limits": { "end": 1, "start": 0, "total": 1 }
}
}
curl -d '{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "playlistid": 1 } }, "id": 4 }' -H 'Content-type: application/json' -X POST 127.0.0.1:8080/jsonrpc
{ "id": 4, "jsonrpc": "2.0", "result": "OK" }
curl -d '{ "jsonrpc": "2.0", "method": "Playlist.GetItems", "params": { "playlistid": 1, "properties": ["file"] }, "id": 5 }' -H 'Content-type: application/json' -X POST 127.0.0.1:8080/jsonrpc
{
"id": 5,
"jsonrpc": "2.0",
"result": {
"items": [{
"file": "plugin://plugin.video.vimeo/play/?video_id=306834650",
"label": "play",
"type": "unknown"
}, {
"file": "plugin://plugin.video.vimeo/play/?uri=%2Fvideos%2F306834650&texttracks=",
"label": "Eddy De Pretto - Random",
"type": "unknown"
}],
"limits": {"end": 2, "start": 0, "total": 2 }
}
}
This is the first video that is played: curl -d '{ "jsonrpc": "2.0", "method": "Player.GetProperties", "params": { "playerid": 1, "properties": ["position"] }, "id": 6 }' -H 'Content-type: application/json' -X POST 127.0.0.1:8080/jsonrpc
{ "id": 6, "jsonrpc": "2.0", "result": { "position": 0 } }
Since using the new endpoint for video URLs, videos are not marked as watched anymore.
This is because the video URLs are now containing the direct media links. But they are not unique, because they contain information that changes on every request:
plugin://plugin.video.vimeo/play/?uri=https%3A%2F%2Fvimeo-prod-skyfire-std-us.storage.googleapis.com%2F01%2F4582%2F15%2F397912933%2F1694765585.mp4%3FGoogleAccessId%3DGOOGLW2TRT7BCCZZO5AX%26Expires%3D1584920570%26Signature%3DtFW37V0YfLKSYeH%252F%252FZSE5ppE5lc%253D
plugin://plugin.video.vimeo/play/?uri=https%3A%2F%2Fvimeo-prod-skyfire-std-us.storage.googleapis.com%2F01%2F4582%2F15%2F397912933%2F1694765585.mp4%3FGoogleAccessId%3DGOOGLW2TRT7BCCZZO5AX%26Expires%3D1584920607%26Signature%3DXsal05srESsMjdRh7m8UXYA40pE%253D
The Expires
and Signature
param change on every request.
As a Vimeo plugin user I want to be able to login to my user account, so I can see my own videos and other details from my profile page.
Login
item is shown in the root view if no user is authenticatedLogin
item is selected, a user can authenticate with a device code (https://developer.vimeo.com/api/authentication#understanding-auth-workflows)My profile
item is shown in the root viewLogout
item is shown in the root viewMy profile
item is selected, a list with the items Videos
, Likes
, Followers
, Following
, Channels
, Groups
is shownThink of a way to protect the Vimeo API secrets. The Vimeo API secret from the Android App will be used.
Hi jaylinski,
I installed the vimeo addon version 5.2.0 in kodi 18.4. I wanted to login to vimeo, because I have purchased videos on my personal account there. But it failed to show the OK dialogbox.
kodi.log notified an exception that unicode characters could not be translated with the ascii encoder in resources/plugin.py line 179.
This is due to the fact that in line 177 in 5.2.0 (l'ine3="{}\n{}".format('...) the template string gets filled with localized strings which contain unicode characters.
I finally fixed it by making the template string unicode as well ('line3=u"{}\n{}".format('...). Then I could successfully activate your addon to use my account and watch my purchased video.
So, I suggest you to make the template string in the master branch unicode the same way at the position:
kodi-addon-vimeo/resources/plugin.py
Lines 170 to 174 in cabfd32
because I guess, it will fail, as well!
Yours, sincerely
purewasa
Hey,
I would like to add the possiblity to manually type Vimeo video ID so I could play the video like in the browser on the URL: https://player.vimeo.com/video/<VIDEO_ID>.
Perhaps it is possible by this: plugin://plugin.video.vimeo/play/?video_id=1 but it's not possible using the addon user interface (as far as I'm concerned).
I cannot do this by typing the ID in "Search" field, because it doesn't return any results.
Hello,
I would like to report a bug: I am not able to videos anymore from on Kodi 18.9 with add-on version 5.2.0.
The navigation in the categories works though.
On MacOS 10.11.6, the error makes Kodi crash and the log is not very clear about this:
https://paste.nomagic.uk/?82894fdbf4b380cd#HzH292SbXjCHZpnDZMS69LGG24Jjr3LbXAD2Eq2SmfV1
On OSMC/RPi 3, Kodi do not crash and the error is the following:
https://paste.nomagic.uk/?fdf3e869e98e1ff1#HyiUujUXr2GypKp52D7gpV4FG1obct1iPrK5AveX81bu
Do you confirm the issue on your side?
Thanks in advance for your support!
Seems there are videos without HLS streams, which will crash the plugin.
See: https://api.vimeo.com/videos?query=Zygote Balls at BIP&per_page=20&fields=name,play
There should be fallback to the progressive stream.
Ref: https://forum.kodi.tv/showthread.php?tid=220437&pid=2927974#pid2927974
This add-on has some advantages in contrast to the ffmpeg decoder, so it would be nice to use it.
This could also be an opportunity to add DASH
as a supported video format.
Videos with the "Who can watch"-setting of People with the private link
or Hide this video from vimeo.com
can't be played.
Ref: https://forum.kodi.tv/showthread.php?tid=220437&pid=2977297#pid2977297
Example video: https://vimeo.com/355062058/5293454954
The search result for people currently only shows videos. It should also show collections and groups of the user.
I guess there was something with xbmc.translatePath to xbmcvfs.translatePath for Python 3
Thanks
Hello,
I have just installed the add-on and when I try to play a video, it seems the video is about to start (title and play symbol on the top-right corner of the screen) but then it stops and the video never plays. I tried with 3 different videos and the result is the same.
Here is my system information:
And the log: https://paste.kodi.tv/ifehisotoy.kodi
I hope I gave you enough information for you to analyze this issue :)
Thank you in advance for your help !
unfortunately I get a runtime error when trying to cast video from browser on windows-PC to kodi ("cast kodi"-addon for Firefox). The video is a vimeo one. you find examples under
https://pur-life.de/artikel/seminare
Thanks for any help.
`2021-01-17 16:25:59.055 T:1022358400 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.RuntimeError'>
Error Contents: Api JSON seems to be invalid
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.vimeo/addon.py", line 3, in
plugin.run()
File "/storage/.kodi/addons/plugin.video.vimeo/resources/plugin.py", line 84, in run
collection = listItems.from_collection(api.resolve_id(video_id))
File "/storage/.kodi/addons/plugin.video.vimeo/resources/lib/vimeo/api.py", line 139, in resolve_id
return self._map_json_to_collection(res)
File "/storage/.kodi/addons/plugin.video.vimeo/resources/lib/vimeo/api.py", line 230, in _map_json_to_collection
raise RuntimeError("Api JSON seems to be invalid")
RuntimeError: Api JSON seems to be invalid
-->End of Python script error report<--
2021-01-17 16:25:59.211 T:1937448976 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.vimeo/play/?video_id=443194048]
`
There is an API endpoint for categories. Would be a nice addition to the "Featured" section.
The (hex) color of the icon does not match the official hex color.
Greetings,
With all the "fun news" going on in the world right now, I've had a lot more events/people begin live streaming over Vimeo. I've never used Vimeo much before, but I use Kodi near daily. When I found this plugin I was super ecstatic to watch on my big screen instead of my laptop. Works perfectly for all the pre-recorded videos that I've watched. Fails every time when I try to watch any live stream. This morning I asked a buddy who has a Vimeo premium account if he'd do some testing with me. Before he started a live stream, I could search for his account and watch any of his videos. As soon as he started a live stream it crashed, and it crashed every time I tried to look at his channel no matter how I did it. The moment he stopped his live stream, I could view his videos again.
According to Kodi, I've got the latest version of the plugin. I only have Raspberry Pi4's (4Gb memory versions) running Libreelec (latest version) to test Kodi on right now: LibreELEC (official): 9.2.1 (RPi4.arm)
The most informative error that I could find (also almost identical every time it crashes) is:
2020-03-29 09:46:07.908 T:2451551088 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the follow
ing error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.RuntimeError'>
Error Contents: Could not convert JSON kind to model...
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.vimeo/addon.py", line 3, in <module>
plugin.run()
File "/storage/.kodi/addons/plugin.video.vimeo/resources/plugin.py", line 95, in run
search(handle, query)
File "/storage/.kodi/addons/plugin.video.vimeo/resources/plugin.py", line 144, in searc
h
collection = listItems.from_collection(api.search(query, "videos"))
File "/storage/.kodi/addons/plugin.video.vimeo/resources/lib/vimeo/api.py", line 99, in
search
return self._map_json_to_collection(res)
File "/storage/.kodi/addons/plugin.video.vimeo/resources/lib/vimeo/api.py", line 218, i
n _map_json_to_collection
raise RuntimeError("Could not convert JSON kind to model...")
RuntimeError: Could not convert JSON kind to model...
-->End of Python script error report<--
2020-03-29 09:46:07.971 T:2468336496 ERROR: GetDirectory - Error getting plugin://plugin.video.vimeo/<private link>
2020-03-29 09:46:07.983 T:3011697120 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.vimeo/<private link>)
failed
I didn't see anyone else reporting this problem. If you have another stream you want me to test on, please let me know. I can also try bumping up all the debugging options too if it helps.
Thanks!
Videos don't have a sound anymore. It seems Vimeo changed something.
Ref: https://forum.kodi.tv/showthread.php?tid=220437&pid=2926599#pid2926599
2019-10-05 15:08:40.853 T:139863688980224 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.KeyError'>
Error Contents: 'request'
Traceback (most recent call last):
File "/home/osboxes/.kodi/addons/plugin.video.vimeo/addon.py", line 3, in <module>
plugin.run()
File "/home/osboxes/.kodi/addons/plugin.video.vimeo/resources/plugin.py", line 81, in run
resolve_list_item(handle, collection[0][1])
File "/home/osboxes/.kodi/addons/plugin.video.vimeo/resources/plugin.py", line 128, in resolve_list_item
resolved_url = api.resolve_media_url(list_item.getProperty("mediaUrl"))
File "/home/osboxes/.kodi/addons/plugin.video.vimeo/resources/lib/vimeo/api.py", line 68, in resolve_media_url
return self._extract_url_from_video_config(res)
File "/home/osboxes/.kodi/addons/plugin.video.vimeo/resources/lib/vimeo/api.py", line 166, in _extract_url_from_video_config
video_files = video_config["request"]["files"]
KeyError: 'request'
-->End of Python script error report<--
2019-10-05 15:08:40.958 T:139865936590976 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.vimeo/play/?video_id=364335684]
Source: https://forum.kodi.tv/showthread.php?tid=220437&pid=2890499#pid2890499
I need F4mproxy and f4mtester in python 3 and compatible with kodi 19+
https://mega.nz/folder/Xpx1mSzb#zMUUtAJC0wqhASkWu1_MKw
According to https://forum.kodi.tv/showthread.php?tid=351745, plugins will only be available in Kodi v19 if they
with
syntax for files: xbmc/xbmc@0775d52future
package from Pipfile, update Python requirement to 3.6 and update README accordinglyThanks to @idleloop-github for making me aware of this by forking the repo (next time please also open an issue π).
Currently there is only a way to hide the search history by setting the search history to 0
in the settings. This does not actually delete the search history until a new search is submitted.
It would be nice to have a Rename
and Remove
button in the context menu (like the YouTube addon has).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.