Coder Social home page Coder Social logo

xbmc-common-plugin-functions's People

Contributors

bossanova808 avatar henrikdk avatar tobiastheviking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xbmc-common-plugin-functions's Issues

Update to support Python 3

Future builds of Kodi will use Python 3.

While testing my own addon (that has a dependency to script.module.parsedom) I found that script.module.parsedom is not Python 3 compatible.

Is Python 3 something you are planning to support?

getParameters cut values with =

request url: ....?param1=123=321
result getParameters: param1='123'
need: param1='123=321'

fix: line 117 replace to
splitCommand = command.split('=', 1)

parseDOM fails on self closing tags

I noticed that some videos in Youtube Plugins have wired plots (unparsed XML content) and started investigation.
For the plot the following statement is used:

parseDOM(node, "media:description")

If node contains something like:

<media:description type='plain'>Foo Description here</media:description>

everything works as expected because ['Foo Description here'] is returned.

But sometimes there is no description. In that case node contains:

<media:description type='plain'/>

parseDom fails here, it should return an empty list, instead it returns everything in node after the desired tag. This results in a video description containing unparsed xml content.

For example see newest youtube videos, they often have no description (I used this for investigation: rkB4wMaJVqw).

getXBMCVersion() crash: ValueError: invalid literal for float(): 13.2ALPHA1

In my raspbmc the youtube plugin failed with this error (I think that is related with your plugin):

22:26:38 T:2903708736   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: invalid literal for float(): 13.2ALPHA1
                                            Traceback (most recent call last):
                                              File "/home/pi/.xbmc/addons/plugin.video.youtube/default.py", line 117, in <module>
                                                params = common.getParameters(sys.argv[2])
                                              File "/home/pi/.xbmc/addons/script.module.parsedom/lib/CommonFunctions.py", line 111, in getParameters
                                                if getXBMCVersion() >= 12.0:
                                              File "/home/pi/.xbmc/addons/script.module.parsedom/lib/CommonFunctions.py", line 103, in getXBMCVersion
                                                version = float(version)
                                            ValueError: invalid literal for float(): 13.2ALPHA1
                                            -->End of Python script error report<--

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.