Release PBS Kids Video Addon
#61
(2020-02-06, 03:34)knappster Wrote: @drgblue, the addon from the repository is broken, but there is a fix outlined in this post:
https://forum.kodi.tv/showthread.php?tid...pid2871897

[EDIT] Code removed by Mod. Please DO NOT put code in a forum post. Post a link to pastebin instead.
Reply
#62
(2020-02-06, 14:47)drgblue Wrote:
(2020-02-06, 03:34)knappster Wrote: @drgblue, the addon from the repository is broken, but there is a fix outlined in this post:
https://forum.kodi.tv/showthread.php?tid...pid2871897
I think I did it wrong. Now it works good and I really appreciate with this.
Thank you so much.
Reply
#63
(2020-02-07, 03:51)drgblue Wrote:
(2020-02-06, 14:47)drgblue Wrote:
(2020-02-06, 03:34)knappster Wrote: @drgblue, the addon from the repository is broken, but there is a fix outlined in this post:
https://forum.kodi.tv/showthread.php?tid...pid2871897
I think I did it wrong. Now it works good and I really appreciate with this.
Thank you so much.
I could make it work but unfortunately it does not work my android OTT device.
My OTT device is Android 4.4 based and only KODI 1.6.1 Jarvis version is supported.
Is this code KODI version dependent?
How can I make it work on KODI 1.6.1?
Reply
#64
(2020-02-07, 08:24)drgblue Wrote:
(2020-02-07, 03:51)drgblue Wrote:
(2020-02-06, 14:47)drgblue Wrote: I think I did it wrong. Now it works good and I really appreciate with this.
Thank you so much.
I could make it work but unfortunately it does not work my android OTT device.
My OTT device is Android 4.4 based and only KODI 1.6.1 Jarvis version is supported.
Is this code KODI version dependent?
How can I make it work on KODI 1.6.1?  

When I ran it on KODI 1.6 Jarvis, it shows following errors.

[EDIT] Error log removed. Please DO NOT post error logs in the forum. Post a link to pastebin instead
Reply
#65
A pull request for Version 3.0.7 has been issued for the kodi.org repo. The add-on should update in a few days.
Reply
#66
Small Update:  I noticed that the shows were no longer listing in alphabetical order, so I assume that under the hood Kodi updated from Python 2.x to Python 3.x.  I have made a small tweak to the "dataDict.keys()" portion of the modified file to fix this functionality by making sure the keys from the main data dictionary object is cast properly as a list so it can be sorted easily.  I tested this on my own device and it seems to be working properly now.  No other changes were made.

Fix is posted below for the "getAddonMenu" function.  Whoever is taking ownership of this can feel free to take the modification and push it formally.

[Code block removed by Mod, please DO NOT put code in forum posts]
Reply
#67
In reply to the above. No it has nothing to do with Py2 or Py3. The source was (I guess) previously sorted.
There is no need for any code change. Just go to your skin options and select Sort by Title, ascending (or whatever you want).
The code change given is incorrect for the current version (3.0.7) in the kodi.org repo, it will fail.

For future reference, please do not post code in the forum. If you feel you need to post code please use pastebin or https://paste.kodi.tv/ or something similar and post a link to that in the forum.

Or better yet, create a PR on the source repo and let the author figure out if it should be included in the code base.
Reply
#68
Sorry, I am not even sure who owns this anymore.  It seems to be rarely updated in the past year every time PBS makes a site change, except when I posted patch fixes here.

With that said, there were a few other issues besides the sorting one.  There are two potential URLs on the PBS site that the show/episode meta data can be located at, and there is also the issue where expired episodes are not properly filtered.  This may or may not be related to the fact that they seem to jump between two different URLs for the show/episode meta data.  I am not entirely sure why they do it how they do it with all the jumping around.

To help combat this, I appended the expire date to the episode description to make it a little more clear, and to help parents know which episodes are about to expire.  Previously, episodes could be listed with valid metadata but expired links.  These episodes would not error out when played, but just fail to play without a clear reason.

I have included a link to the working code I just tested today (2020-05-07) below.  It is the entire "scraper.py" file since I needed to make a few modifications to both the "getAddonMenu" and "getAddonEpisodes" functions this time.  Enjoy!

[Removed by Mod - is not based on current version available in the kodi.org repo]
Reply
#69
I know that you're trying to be helpful but your posts are just going to confuse people. The scraper.py that you're modifying isn't remotely like the current version 3.0.7 in the kodi.org repo. You can find the current version here https://kodi.tv/addon-author/t1m or just load it from the kodi.org repo. This thread has gotten out of synch with the actual add-on in the repo.

Please use the current version of the add-on in the kodi.org repo (I've repeated this several times now). I'm aware of an unrelated issue with "Miguel & Maya" which I'll fix in a future release.
Reply
#70
Fair enough.  I pulled and updated the 3.0.7 version with comparable versions of my updates if you wanted to take a look.  The link is pasted below.  The differences are that there are two potential locations to pull data from, and that there is no filtering on posted meta data links that have expired on the site, which means there really is no video.

Also, there really is no issue currently with "Miguel & Maya", the PBS site just currently has no valid episodes listed, only a short clip.  I guess filtering that out on the main menu is possible, and may or may not be a good idea.  I won't bother posting again unless a new issue comes up.  Thanks for keeping on eye on this.

https://pastebin.com/jWGHVrPS
Reply
#71
The problem with your approach is that one of those services is obsolete and will die sometime in the future. We shouldn't be fixing issues with the source website in add-ons. The issue I was referring to for Miguel & Maya is just what you point out.

Thanks for your input. I really wasn't aware of any of your changes. In the future it would be better if you did a PR on GitHub. It's a better place to discuss and resolve coding than the forum is.
Reply
#72
@learningit I am appreciate you maintaining this addon.  There was a period of time that it only worked with some modifications which @Seraphpdh or @jmraker had posted.  You mention that you would prefer a Pull Request on Github.  Without being familiar with the structure of github for these addons, would this be the appropriate place for anybody who would like to contribute?
https://github.com/learningit/repo-plugi...hes/active

They could then select pbs kids from the active branches.  I just thought having this information will make it easier for those who want to contribute.

P.S., the link on the first post of the thread appears to be broken when I click it:
https://github.com/learningit/plugin.video.pbskids
Reply
#73
(2020-05-10, 13:20)knappster Wrote: @learningit I am appreciate you maintaining this addon.  There was a period of time that it only worked with some modifications which @Seraphpdh or @jmraker had posted.  You mention that you would prefer a Pull Request on Github.  Without being familiar with the structure of github for these addons, would this be the appropriate place for anybody who would like to contribute?
https://github.com/learningit/repo-plugi...hes/active

They could then select pbs kids from the active branches.  I just thought having this information will make it easier for those who want to contribute.

P.S., the link on the first post of the thread appears to be broken when I click it:
https://github.com/learningit/plugin.video.pbskids

Just to kind of clear the air on things:
I absolutely encourage people to fork my repo and make whatever customizations, bug fixes, etc. they desire. I also encourage folks to submit those changes to be incorporated into the add-on in the repo, preferably through GitHub. My repo is a fork of the xbmc/repo-plugins. I very rarely delete branches for versions of add-ons that are submitted to the xbmc/repo-plugins (or repo-scripts). If you don't see a specific version branch (like for PBS Kids you'll see the latest branch at https://github.com/learningit/repo-plugi...kids-3.0.7 ) you will need to look at addon.xml and figure out what branch the base code is in by looking at the version of xbmc.python.
If you are going to submit a PR against a branch, it's important that you name it something like leia-plugin.video.pbskids-3.0.7-oscarschanges so I know where you started from and what you're trying to add to.

I'm not sure that using branches/active as suggested above is always correct, branches do get marked 'stale' after a period of inactivity, but https://github.com/learningit/repo-plugins/branches will show everything in the repo.

Having said all of the above, I rarely just incorporate a proposed change. Using recent history of this add-on, I would not add in the sorting of the episodes. My philosophy these days about add-ons is: less is better. Kodi has evolved to the point where an add-on shouldn't be doing many things that they needed to in the past. Most skins (certainly the default, Estuary) have options for selecting how to sort entries for a given directory. That is the correct place to handle sorting, not in the add-on.  Things like image caching, etc. are also handled by Kodi and rarely need to be done in the add-on these days.

When I write an add-on I try to mimic the website usage as if a browser was being used as closely as I can. I avoid using urls or services which, though I may be able to get interesting things through them, are obsolete or being used for other purposes.  Most users are not aware that there are a number of rules governing what is and isn't allowed in the official kodi.org repo. Simple things like string constants for displayable items aren't allowed, they must be translatable strings. Specific code styles for python are strongly encouraged. More complex things like code that allows a user to download a video or obtain a download url generally are not allowed unless the source website allows it. I get all kinds of requests, some innocent, some not so innocent about things I should add into add-ons. I generally ignore them as i try to keep add-ons within a framework so that I can maintain them more easily. As more functionality is built in to Kodi or it's skins, I tend to go back and rip out code to simplify add-ons and frown upon things that add complexity. So in a nutshell, even though you may be of the opinion that some thing should be added into an add-on, I may not. If you feel strongly about it, take the existing code as a base, rename the folder and addon id and create a new journey for yourself.

Lastly there are a number of my previous add-ons which are floating around in places that I would prefer them not to be.  i don't have any control over that situation. Many of those add-ons received take-down requests in the kodi.org repo, mainly for use of logos, copyrighted content, etc. Kodi.org always honors those requests, as do I. I have seen patches submitted to the forum which try to keep those add-ons alive after takedown. People need to learn to respect those takedowns, they are important for the Kodi project's integrity.
Reply
#74
Version 4.0.0 released to Kodi v19 repo.
Support for live stream added.
PLEASE NOTE: This add-on is native Py3 and will only run on Kodi v19 or above.
Reply
#75
When I tried to add the Add-on to favorites, there is no option to do that in the context menu. Is that something that can be fixed?
Reply



Logout Mark Read Team Forum Stats Members Help
PBS Kids Video Addon0
This forum uses Lukasz Tkacz MyBB addons.