hirsivaja / plugin.video.areena Goto Github PK
View Code? Open in Web Editor NEWYLE Areena plugin for Kodi, using the official API.
License: GNU General Public License v2.0
YLE Areena plugin for Kodi, using the official API.
License: GNU General Public License v2.0
I've tried at least four different skins and fiddled around the Kodi and plugin settings, but cant seem to get any "plot" info to shoiw up on the UI. Is there any videos that anyone can get to show their plot info on any field in Kodi. I've tried lot of skins with different version of OE 6 to 7Alpha and videos from many categories like Poirot, Vera Stanhope tutkii, Smack the pony and Pasila.
Newer Python version check the SSL certificate by default. Because of this the connection to Yle fails. See PEP 476 for further details.
I don't know if YLE API provides the info about if episode is watched or not, but I just opened the series "rauhantekijä", and it doesn't show if I've watched the episodes or not. I recall some of the plugins show if you have watched the episode. There is different kind of icon next to show.
I wonder if it's possible to have similar marking with yle areena? Here is what it looks like now:
and here's what it looks in Netflix plugin:
Of course, I'd not like to loose the thumbnails :D
The client does not synchronize favourites list between different clients. I don't know if this is a feature request or a bug report.
Does the API provide this information? And can it be sent back to server?
I was testing Kodi 19 alpha the other day and noticed that this addon is not supported.
I have moved back to 18 but if need be, I can upgrade again and provide debug logs and such. I'm not familiar with Kodi development so I'm just not sure what is needed.
EDIT: If I recall correctly, one of the big changes in Kodi 19 was the move to Python 3. This might be a bigger undertaking as I initially thought
There are usually two options in the menu to select from. Both are such as "Unknown - some_identifier", where some_identifier a is string of characters. My guess is that it would be UUID for the specific subtitles.
The issue is same also when the main language of the content is Finnish.
Plugin version: 2.4.5
Kodi version: 18.2
OS: Raspbian 9 Stretch
Not so much issues, but two major feature requests:
Love this add-on on Raspberry Pi Kodi - thank you plenty for it and keep up the good work!
It would clean up the UI very much If when browsing through different categories like Shows - Foreign shows or Comedy, that only "non series"-videos would be on the root directory of the category, and all "series"-videos would be placed inside folders that are named by their corresponding series title (and of course shown before the "non series" videos). Could this be achieved by using the part_of_series tag and remove these from the category root, and create a folder based on the tag, and locate the videos there?
So basically, when retrieving category videos, first list all the part_of_series tags, create folders for these, then hide videos based on these folders and display the rest. Then when user selects the folder, list videos based on the part_of_series tag.
Hi,
I tried to watch Rauhantekijä from areena. I needed the subtitles and tried to select them. However the three available selections look more like some UUIDs. And none of them enable Finnnish subtitles. However, the same series downloaded by yle-dl show finnish subs just fine.
Kodi is of version 18.7.1 and this plugin is from Masters branch latest.
I noticed that out of the blue, my Areena-plugin stopped working. It just did nothing when I tried to search or list anything. First I suspected, that it had something to do with changing to LibreElec while ago, but after installing OpenElec and entering the keys again, no luck. Then I removed the plugin manually and installed it again, but no luck. Then I went digging in to the log, and found out, that I was gettin 401 answers from yle, so I suspected that something corrupted my keys. I went to yle site and check my keys, but they were correct. Then I tested the keys with yles own link and it gave me the same 401 error, so I contacted yle and they confirmed they have some problems in their own systems, so the error was not in the plugin or my keys,
Could it be possible to get some meaningfull error from the plugin in Kodi, when the authorization with API-keys fails, so in the future I don't have to reinstall everything because of non-woking keys?
Need a plugin update because the channel merge
LibreELEC (community): nightly-20210407-84b62ff (RPi2.arm) with Kodi 19.
Everything else works (including search and radio play), but video playback does not.
I also disabled VPN Manager but that did not change a thing. (The log had it enabled).
Activated kodi's debug logging and grep'd areena from it. Attached.
areena.log.
News and sports not supported in API - any idea why and/or would there be a way around it?
The content available from Yle can have four different ContentProtectionPolicy -values. They are:
Only content with values 1 or 2 can be viewed through the API.
A check is needed, so that only those videos are shown that are viewable.
The plugin is only able to show some of the videos when using Kodi 15 (for example OpenElec 6).
I don't know if this is a limitation of the YLE API but right now because of the sorting of episodes, this plugin is basically unusable for watching any series with more than a couple episodes.
Steps to reproduce:
This is a minor problem but as I am using Kodi with Home Automation hub, I noticed that plugin.video.areena never showed the actual title of the video playing. Instead Kodi shows the url of the media as the title. This affects also users who are using the web interface to control Kodi.
Something like this seems to work:
# Create a playable item with a path to play.
play_item = xbmcgui.ListItem(path=path)
label = u"Areena"
if "title" in data:
for language_code in get_language_codes():
if language_code in data["title"]:
label = u"{}: {}".format(label, data["title"][language_code])
break
play_item.setLabel(label)
if "image" in data and "available" in data["image"] and data["image"]["available"]:
image_url = '{0}/{1}/{2}.{3}'.format(_image_cdn_url, _image_transformation, data['image']['id'], 'png')
play_item.setThumbnailImage(image_url)
play_item.setSubtitles(subtitle_list)
# Report usage to YLE
Nevertheless, I like this plugin very much and have been using it already over a year! Thanks!
I'm using plugin with LibreElec / Kodi Krypton 17.1, and noticed that it is capable of autoupdating this plugin. But after updating it, the plugin forced me to input my Areena credentials again, even though I already had working install, with working credentials. I'm not sure, if this is a feature/bug of the plugin, or Kodi, but It would be preferable not to overwrite old credentials.py or at least leave user the option, not to input the credential and use old, when installing new version.
Error messages are pretty same as in the previous issue: "Provide some error message to kodi user interface when authorization with keys fail".
NOTICE: Starting Kodi from Debian (17.6 Debian package version: 2:17.6+dfsg1-2+b1). Platform: Linux x86 64-bit
.
.
.
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IOError'>
Error Contents: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage instance at 0x7f4b706af680>)
Traceback (most recent call last):
File "/home.ssd/kodi/.kodi/addons/plugin.video.areena/main.py", line 1183, in
router(sys.argv[2][1:])
File "/home.ssd/kodi/.kodi/addons/plugin.video.areena/main.py", line 1169, in router
live_tv_channels(path)
File "/home.ssd/kodi/.kodi/addons/plugin.video.areena/main.py", line 555, in live_tv_channels
data = get_areena_api_json_data('programs/schedules', 'now.json', ['service=' + service])
File "/home.ssd/kodi/.kodi/addons/plugin.video.areena/main.py", line 65, in get_areena_api_json_data
response = get_url_response(url)
File "/home.ssd/kodi/.kodi/addons/plugin.video.areena/main.py", line 939, in get_url_response
raise error
IOError: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage instance at 0x7f4b706af680>)
-->End of Python script error report<--
ERROR: GetDirectory - Error getting plugin://plugin.video.areena/?action=live
ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.areena/?action=live) failed
Yle keys are checked (plugin used to work with these)
Version of the plugin: 2.4.4.
Live-TV feature is not always working on RPi3. Sometimes it is working and sometimes it throws an error and does not show the list of available broadcasts.
Copypaste from kodi.log when error happens:
19:03:52.510 T:1911595008 ERROR: Control 55 in window 10025 has been asked to focus, but it can't
19:03:55.700 T:1703002880 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 characters in position 26-27: ordinal not in range(128)
Traceback (most recent call last):
File "/home/pi/.kodi/addons/plugin.video.areena/main.py", line 1122, in
router(sys.argv[2][1:])
File "/home/pi/.kodi/addons/plugin.video.areena/main.py", line 1108, in router
live_tv_channels(path)
File "/home/pi/.kodi/addons/plugin.video.areena/main.py", line 512, in live_tv_channels
get_color('menuItemColor'), get_translation(32072) + title))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 26-27: ordinal not in range(128)
-->End of Python script error report<--
19:03:55.745 T:1911595008 ERROR: GetDirectory - Error getting plugin://plugin.video.areena/?action=live
19:03:55.746 T:1911595008 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.areena/?action=live) failed
First of all, great plugin, thanks. I use it to watch series from areena, Arne Dahl right now. It plays fine on RasPi2 Kodi on XBian, but subtitle sync beed to be adjusted several times per episode.
It starts fine, but goes seconds off from timing after while. It starts by drifting a bit, but soon is 10 seconds behind. I adjust it from the subtitles menu, the timing sync feature.
It is not the only show. It happened also with Sorjonen, where I had it on by default, even I don't need it as it was in Finnish already.
I'm not sure if it is due pausing in middle, or does it somehow change stream or something in the middle. Or does it jus keep going a bit slow continously. I try to make sense of the behaviour.
Reproducal would be, start the mentioned series, and select the second subtitle from subs menu (Finnish, even though the string there is gibberish), and just let it play.
Version: Starting Kodi (17.6 Git:2017-11-18-433b93a). Platform: Linux ARM (Thumb) 32-bit
And plugin is the latest from github.
Message from Yle:
Hei!
Alkaen 1.11. Yle API vaatii sitä hyödyntävissä sovelluksissa HTTPS- ja SNI-tuen (Server Name Indication). Selainsovelluksissa tuki on yleensä kunnossa. APIa kannattaa jatkossa kutsua aina HTTPS-protokollaa käyttäen.
Lisätietoja:
https://en.wikipedia.org/wiki/Server_Name_Indication
https://developer.yle.fi/Lähetimme tämän viestin, koska tällä sähköpostiosoitteella on avain Yle APIin.
Hello,
Starting November 1st, Yle API will require applications to support HTTPS and SNI (Server Name Indication). Browser-based applications usually support both by default. We recommend to always call the API using HTTPS.
More information:
https://en.wikipedia.org/wiki/Server_Name_Indication
https://developer.yle.fi/en/index.html
does the plugin fulfill these requirements?
Hi,
Thanks for the nice plugin. One small thing bothers, I don't quite get how stuff goes to favourites from here. There seems to be two favourites, the general Favourites in Kodi main menu. Then there is Favourites in plugin opening menu. Then each item let's to select
It would be more clear if the menu told to which favourites it means, the plugin menu or main menu? E.g:
and the same for the remove from Favourites
I am searching for it, but I cannot find it e.g. here https://kodi.tv/addons
Hi, I received an email today concerning the changes of the Yle API. Is this something that will affect this plugin?
Hello, user of Yle API!
We at Yle have been taking a look at open interfaces based on their use. We are disabling some of the lesser-used interfaces and focusing our maintenance resources on the critical functions. For this reason, programme data and stream distribution data interfaces will be removed from the Yle APIs during the spring.
If your current API solution is of social or business importance to you or your company, you can request access to an internal API whose interfaces are different from the current implementation. At this stage, we are accepting professional partners who use APIs to maintain services intended for a broad user base as internal API users.
We are currently mapping out the use of open interfaces, and we hope that you contact us via this form if the use of an internal API is necessary to your operations:
https://forms.gle/hc6yFMyAvydgcq1JAWe are aiming to provide access to the new interface to everyone whose operations would be significantly hindered from not being able to use an interface.
URLs of the APIs being disabled:
https://external.api.yle.fi/v1/programs/items.json
https://external.api.yle.fi/v1/programs/items/{id}.json
https://external.api.yle.fi/v1/series/items.json
https://external.api.yle.fi/v1/series/items/{id}.json
https://external.api.yle.fi/v1/programs/categories.json
https://external.api.yle.fi/v1/programs/services.json
https://external.api.yle.fi/v1/programs/services/{id}.json
https://external.api.yle.fi/v1/programs/schedules.json
https://external.api.yle.fi/v1/programs/schedules/now.json
https://external.api.yle.fi/v1/programs/nowplaying/{service}.json
Hi,
I'm having problems running the plugin due to limited bandwidth. The playback starts, but is constantly buffering. Setting the maximum resolution to "Automatic" does not adjust the resolution down despite the constant buffering. Manually adjusting the setting to some low value also has no effect on the output or playback success.
My suspicion is on the get_resolution_specific_url() function containing only a TODO. If this is the plausible reason for the slow playback, would it be possible to implement this function?
System: FireTV 1st Gen., Kodi 17.6.
Thanks!
http://yle.fi/aihe/artikkeli/2017/02/21/ajansiirto-ominaisuus-areenan-tv-kanavalahetyksiin
Sorry for the previous start that I forgot to return to.
Areena currently has this server side timeshift feature activated that can be used in regular web browsers, so shouldn't it be possible to implement it to Areena API plug in too, as it is a feature provided by Areena's side? It would be cool to be able to browse back and forth in the open live stream and pause it without losing a moment in Kodi too and especially cool, if it would work in Raspberry Pi Kodi.
Also sorry to hear that no plans of implementing download feature to Areena Plug-in, since FlickFetch dev claims to have no skills(?) to port his software to Kodi and make it compatible with Raspberry Pi. Problem is that Windows doesn't run in Rasp, but Rasp is convenient to keep on-line all the time as it's consuming very little energy, much less than the most energy efficient Windows laptop for example.
I myself haven't found by googling a generic working download addon for Kodi, that would work for any video stream available. If there's one, please name it, so I can search for further info about it.
Anyway, this timeshift alone would be a great improvement in overall usability of the Areena API plug-in, if it's possible to implement and why shouldn't it be?
The program listing can become filled with short clips of some series. Now it is happening with dozens of under 1 minute clips of Pasila 2.0 series.
Hi,
Good job with the plugin! Are there plans to add it into the official Kodi repo?
Thanks.
-olli
Can somebody be so kind and help with how this can be installed on Kodi?
I ran into a problem after updating from LibreElec Kodi 17 Krypton to 18 Leia today, yesterday I was watching Yle Live TV with this add-on normally, but today all I get is this error:
2019-04-08 21:31:32.928 T:1570440048 WARNING: plugin.video.areena: No publication with 'currently': {u'fi': u'Yle Areena: J\xe4\xe4kiekon naisten MM: Kanada - Ven\xe4j\xe4'}
2019-04-08 21:31:32.933 T:1570440048 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 characters in position 29-30: ordinal not in range(128)
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.areena/main.py", line 1122, in
router(sys.argv[2][1:])
File "/storage/.kodi/addons/plugin.video.areena/main.py", line 1108, in router
live_tv_channels(path)
File "/storage/.kodi/addons/plugin.video.areena/main.py", line 512, in live_tv_channels
get_color('menuItemColor'), get_translation(32072) + title))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 29-30: ordinal not in range(128)
-->End of Python script error report<--
2019-04-08 21:31:33.122 T:1339761520 ERROR: GetDirectory - Error getting plugin://plugin.video.areena/?action=live
2019-04-08 21:31:33.124 T:1937612816 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.areena/?action=live) failed
I saw this issue had been brought up, solved and closes in 2018 Jan. #25
Today I installed Yle Areena addon from freshly downloaded master .zip, I use fi_latin keyboard layout for LibreElec system and English for interface language with default character set and Swedish QWERTY in regional settings, if it makes difference. Everything else in Areena addon has been working normally.
Kodi running on Raspberry Pi. Remotely controlled with Kore App.
Occasionally when selecting "Play from here" in context menu the whole Kodi crashes and requires a app restart. This does not happen always and I have not yet figured out exact way of reproducing. Seems to only occur when using Kore app to remotely control Kodi. With mouse/keyboard control of Kodi seems OK.
With headless mode with audio only setup this causes the system to go an unrecorevable state as it enters the Linux command line. Only ways to recover is to restart the system or use keyboard to run kodi --standalone
Unfortunately accessing the logs on my Kodi box is a bit cumbersome. I'll try to write here the cruacial parts and can provide further information on request.
Command line output
terminate called after throwing and instance of
std::logic_error
what(): busy diaog already running
Aborted (core dumped)
Crash report available at ....
Crash report from above seems to only contain basic system info and lines such as
[New LWP 3885]
Last entries in ~/.kodi/temp/kodi.log have lines such as
NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder mp3float
WARNING: CDVDMessageQueue(video)::Put MSGQ_NOT_INITIALIZED
ERROR: CWebServer[8080] failed to hande HTTP request for /image/
WARNING: plugin.video.areena: no title for stream: {u'se': u'Geasse guvlui ovttas johtit dearvvas!'}
-- NOTICE level logs about closing stream etc and waiting for threads to exit
ERROR: Control 50 in window 10025 has been asked to focus, but it can't
Kodi version: 18.2 (raspian stretch)
Plugin version: 2.4.5
Kore version: No exact version number available, but latest (updated 28.12.2019) version
I was selecting randomly some content in order to test this. The weird title "Geasse guvlui.." might actually be part of the name of some content. I was able to reproduce this with pretty much any content. In fact the title might not have anything to do with this and it might just be localized title name (Sámi ?).
Workarounds
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.