Giter Club home page Giter Club logo

kodi-addon-vimeo's People

Contributors

jaylinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

stepanort selu

kodi-addon-vimeo's Issues

Error on saved search with non-ascii characters

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

SyntaxError: 'utf8' codec can't decode byte 0x8a in position 0: invalid start byte

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.

Improve fallback for progressive video quality

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.

elif video_type == "progressive":
for video_file in video_files["progressive"]:
if video_file["quality"] == video_type_setting:
return video_file["url"]
# Fallback if no matching quality was found
return video_files["progressive"][0]["url"]

Add possibility to Like videos and add them to "Watch later"

Acceptance criteria

  • Context menu on videos shows a Like button if user is logged in
    • If video is liked, it is added to Likes and a success-message is displayed
  • Context menu on videos shows a Watch later button if user is logged in
    • If video is liked, it is added to "Watch later"-list and a success-message is displayed

More info

Should disliking also be supported?

Livestreams don't play

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.

Vimeo on demand (feature request)

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

How to call the Vimeo add-on from another add-on

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.

Test Python 3 compatibility

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.)

Fails to follow configuration's quality settings

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.

Video duplicated in playlist

Describe the bug

When you add a video with JSON-RPC, the video is duplicated in the playlist.

To Reproduce

  1. In Kodi, Allow remote control via HTTP (Settings / Services / Control).
  2. Execute (by changing the IP address):
  3. 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" }
  1. 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" }
  1. 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 }
    }
}
  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" }
  1. 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 }
    }
}

Environment

  • Kodi version: 19.4
  • OSMC version: 2022.03-1
  • Vimeo add-on version: 6.0.1

Additional info

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 } }

Videos are not marked as watched

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.

Add login

Description

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.

Acceptance criteria

  • A Login item is shown in the root view if no user is authenticated
  • If the Login item is selected, a user can authenticate with a device code (https://developer.vimeo.com/api/authentication#understanding-auth-workflows)
  • If a user is authenticated, a My profile item is shown in the root view
  • If a user is authenticated, a Logout item is shown in the root view
  • If the My profile item is selected, a list with the items Videos, Likes, Followers, Following, Channels, Groups is shown

Notes

Think of a way to protect the Vimeo API secrets. The Vimeo API secret from the Android App will be used.

Proposal to fix "Login to vimeo fails"

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:

message="{}\n{}\n{}\n{}".format(
addon.getLocalizedString(30152).format(format_bold(activate_link)),
addon.getLocalizedString(30153).format(format_bold(user_code)),
addon.getLocalizedString(30154).format(format_bold(user_code)),
addon.getLocalizedString(30155).format(format_bold("OK")),

because I guess, it will fail, as well!

Yours, sincerely

purewasa

Play Vimeo video by manually typing its ID in the addon interface

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.

Can't play videos in HLS format anymore

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!

Improve search for people

The search result for people currently only shows videos. It should also show collections and groups of the user.

Can't play videos on macOS

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:

  • MacOS 10.11.6
  • Kodi Leia 18.6
  • Vimeo add-on v5.1.3

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 !

Domain protected videos can't be played (RuntimeError)

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]

`

Add categories section

There is an API endpoint for categories. Would be a nice addition to the "Featured" section.

Live crashes the plugin

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!

Plugin fails to play videos with setting "Where can this be embedded? > Nowhere"

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

Submit plugin to Matrix branch

According to https://forum.kodi.tv/showthread.php?tid=351745, plugins will only be available in Kodi v19 if they

  • bump the xbmc.python dependency to 3.0.0 in the addon.xml file
  • are re-submitted to the Matrix branch

TODO

  • Create a Krypton branch to be able to backport fixes
  • Add a Matrix bagde to the README
  • Strip Python 2 compatibility stuff (script.module.future)
  • Use new settings format (https://kodi.wiki/view/Add-on_settings_conversion)
  • Use with syntax for files: xbmc/xbmc@0775d52
  • Remove future package from Pipfile, update Python requirement to 3.6 and update README accordingly
  • Update vimeo.py to latest version (https://github.com/vimeo/vimeo.py)
  • Add Python 3.6 and 3.9 to test matrix
  • Submit plugin to the Matrix branch
  • Create a new release

Make it possible to edit and delete the search history

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.