Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
My 30 Add-on API wishes
#76
I hadn't much time to follow the development recently, is there anything I can flag as "WIP" or even "done"?
My GitHub. My Add-ons:
Image
Reply
#77
(2013-12-12, 01:52)sphere Wrote: I hadn't much time to follow the development recently, is there anything I can flag as "WIP" or even "done"?

1.5 is WIP and will most likely make it to 13.0 (see PR: https://github.com/xbmc/xbmc/pull/3682 )
Reply
#78
5.8 Python Scrapers: wip http://forum.xbmc.org/showthread.php?tid=134012
5.9 Split VFS-providing and PLAYURL-providing Plugins: Kinda solved with the context menu add-ons. Not currently possible to override default action afaik though
Reply
#79
Hi,

here are a few ideas related to the weather window and weather addons.

1. Skin
1.1 dynamic skin includes
By now, there are at least 5 weather addons (wunderground, ozweather, weather plus, met office, openweathermap) which require skin changes to show "all" possible features. But Skin changes will require manual patching of the files which isn't very userfriendly and those changes are not obvious for a user who installs such an addon within xbmc.

My suggestion here is that at least the default skin should allow addon developers to dynamically include different views (5 day forecast, 7 day forecast, 10 day forecast, hourly, weekend, maps) by setting a specific value. Like this for example set_property('7day.IsFetched', 'true').

1.2 hide empty labels
For example UV-Index is only provided by wunderground, with any other addon this value will be empty so there is no reason to show it. Maybe its possible to make it dynamically too, giving the addon developer the possibility to show another value instead.

1.3 grab units from the addon settings instead of xbmc regional settings
This is a requirement if 2. is agreed

2. Core
Some values are automatically converted to another according to the regional settings, some are not. it is not obviuos for developers which values. Same for auto translations in some cases.

My suggestion here is to remove both, giving the developer the control over this part

on the other hand the api should provide the following functions
- function to convert a unit
- calculate dewpoint
- calculate feelslike
- winddirection: convert degrees to (translated) long or short string like WSW or Westsouth-west

The last 3 are nearly in every addon in the utilities.py and i don't think its nessessary to copy them over and over again.

This will also allow "overwriting" the regional settings in the addon (there are a few posts where users asked for this).


I know these changes would brake current addons, but i don't have another idea how weather addons could be done fully featured and user friendly.
Reply
#80
(2013-12-12, 23:01)Basje Wrote:
(2013-12-12, 01:52)sphere Wrote: I hadn't much time to follow the development recently, is there anything I can flag as "WIP" or even "done"?

1.5 is WIP and will most likely make it to 13.0 (see PR: https://github.com/xbmc/xbmc/pull/3682 )

1.5 is in master now. So it is completed
Reply
#81
(2014-01-13, 12:35)Basje Wrote:
(2013-12-12, 23:01)Basje Wrote:
(2013-12-12, 01:52)sphere Wrote: I hadn't much time to follow the development recently, is there anything I can flag as "WIP" or even "done"?

1.5 is WIP and will most likely make it to 13.0 (see PR: https://github.com/xbmc/xbmc/pull/3682 )

1.5 is in master now. So it is completed

I updated the first post, thanks!
My GitHub. My Add-ons:
Image
Reply
#82
I have a few ideas that might be useful until some of these get implemented:
Workarounds:
1.2 Could be accomplished with an addon that runs a proxy service. Some work is already being done on this front to implement multi-threaded connections
1.3 Maybe also doable via a proxy addon
2.3 I currently display the skin's text viewer dialog and set the text control's content to the changelog. I check version numbers in my main menu and if an upgrade has occured, I pop this window.
4.4 My 2.3 workaround also accomplishes this
5.7 I think this can be done with the AlarmClock builtin. Use the RunScript builtin as the command parameter, and set the next alarm within your script
5.9 This has been implemented through the URLResolver addon. Give it a list of pages and it gives you back a playable links
5.13 Wrap the main execution block in a try/except block. On exception, display the skin's text viewer and set it's content to traceback.print_exc()

Updates:
7.1 Zag is working on cleaning up the dev wiki based on this thread: http://forum.xbmc.org/showthread.php?tid=179624

Request for additions:
1. Ability to set addon settings based on the return value of a script, from within the settings dialog
2. A small optimization: xbmc.executeJSONRPC() to accept a dict instead of just a str. The idea is that the method would convert the dict in C instead of Python. Could speed things up on things like the RPi when there are a large amount of JSONRPC transactions

Hope that helps!
Reply
#83
Hi,

I already know workarounds for most of my wishes, but they are still just workarounds Wink
Other than that,
thank you for your ideas! Smile

(2014-01-13, 18:14)Bstrdsmkr Wrote: 1.2 Could be accomplished with an addon that runs a proxy service. Some work is already being done on this front to implement multi-threaded connections
Interesting. I also thought about such a solution but ran into (for me) unsolvable problems. Do you have more details?

(2014-01-13, 18:14)Bstrdsmkr Wrote: 1.3 Maybe also doable via a proxy addon
Same like above.

(2014-01-13, 18:14)Bstrdsmkr Wrote: 2.3 I currently display the skin's text viewer dialog and set the text control's content to the changelog. I check version numbers in my main menu and if an upgrade has occured, I pop this window.
Yes I also do. But IMO this isn't optimal. Goal should be that only the relevant part of the changelog should be shown. Best would also if this "show changelog since last update"-setting should be configurable globally for all users. It should work similar like the App-Stores do.

(2014-01-13, 18:14)Bstrdsmkr Wrote: 4.4 My 2.3 workaround also accomplishes this
Of course your workaround works, but a generic integrated magically for all add-ons working solution should be preferred. See above Smile

(2014-01-13, 18:14)Bstrdsmkr Wrote: 5.7 I think this can be done with the AlarmClock builtin. Use the RunScript builtin as the command parameter, and set the next alarm within your script
This is an good enough workaround. I think about deleting this wish (or mark as done). There aren't very much usecases too.

(2014-01-13, 18:14)Bstrdsmkr Wrote: 5.9 This has been implemented through the URLResolver addon. Give it a list of pages and it gives you back a playable links
Is this add-on still maintened and in the official repository? Last time I checked, it was kind of outdated. An integrated solution should also be prefered here.
Also, the resolver parts could be splitted into seperate add-on this way. ATM a similar behavior still takes place when XBMC tries to open an unknown plugin-path, example: If plugin A adds a listitem with a path pointing to url like "plugin://B" (plugin B) and this plugin is available via any local installed repository XBMC asks "This requires add-on B, do you want to install?".

Have a look how Plex is it doing.

(2014-01-13, 18:14)Bstrdsmkr Wrote: 5.13 Wrap the main execution block in a try/except block. On exception, display the skin's text viewer and set it's content to traceback.print_exc()
Yes, this will work. And I also do something similar. But 99% of other add-ons show implicit "Script error in default.py" which isn't very helpful. If this message would be something like "default.py:35 KeyError: There is no 'param' in video" it would make the life of add-on developers more easy Wink
Also, this dialog shouldn't be a notification IMO, it should be an OK-Dialog (with a timeout).

(2014-01-13, 18:14)Bstrdsmkr Wrote: 7.1 Zag is working on cleaning up the dev wiki based on this thread: http://forum.xbmc.org/showthread.php?tid=179624
Yes, there was much done recently. This can be marked as solved shortly Smile

(2014-01-13, 18:14)Bstrdsmkr Wrote: Request for additions:
1. Ability to set addon settings based on the return value of a script, from within the settings dialog
This time I can tell you a workaround Smile
You can use a setting of type "action" to run your own add-on with given params to e.g. show a dynamic filled Dialog().select(). When this got closed you can store whatever you want in this setting's value.
See e.g. here:
Settings: https://github.com/dersphere/JamBMC/blob...gs.xml#L26
Add-on: https://github.com/dersphere/JamBMC/blob...on.py#L471

(2014-01-13, 18:14)Bstrdsmkr Wrote: 2. A small optimization: xbmc.executeJSONRPC() to accept a dict instead of just a str. The idea is that the method would convert the dict in C instead of Python. Could speed things up on things like the RPi when there are a large amount of JSONRPC transactions
Good idea, I will add it with an addition: It should accept _and return_ python native objects (dicts) because the response will be more expensive to parse than the request.
My GitHub. My Add-ons:
Image
Reply
#84
Youtube seems to be switching to DASH video (ie seperated audio and video streams for increased efficiency in streaming), this puts 1.4 on the top of my list.
Reply
#85
@sphere, I feel like your proposed solution for 5.7 is better than using AlarmClock so I wouldn't call it done yet. For example with the alarm clock, if any of the runs produce an error, the while chain dies and it could be a while before anyone notices.
I consider all my work around above to be dirty hacks and feel like a proper interface is needed. I just posted them for people who land here via Google in the interim.

URL Resolver is still maintained and in repo. Currently, the majority of the contributors make their homes on other sites, but if you need something added, just drop a PR here: https://github.com/Eldorados/script.module.urlresolver
Docs need love but are available here: http://t0mm0.github.io/xbmc-urlresolver/...olver.html it was semi inspired by the plex service, and dynamically loads any resolver you drop into the folder so nothing is hard coded
Reply
#86
I'm not sure if this is the right place to ask this, nor if it is OK to revive this thread after 4 months, but it seemed to be the most appropriate place for this question.

I would very much like to have support for the statvfs module that is available in the os module in Python, but for the xbmcvfs module instead. The reason I ask is the addon I'm maintaining needs disk space checks on remote shares, e.g. NFS or SMB, from Linux and other non-Windows OSes. This does not work with the regular statvfs method, which means I need to build this behavior myself by copying various parts of XBMC's internal file system. Since I'm no genius with respect to C++ this is hard for me. Is there any chance a statvfs method could be added to xbmcvfs in the future? If there is another solution to solve my problem, that would be fine too of course Smile
Reply
#87
Is this what you are looking for? It appears size is one of the functions:

http://mirrors.xbmc.org/docs/python-docs....html#Stat
Reply
#88
Unfortunately not. At first I thought so too, but it only retrieves the file sizes for single files. What I need is entire drives/shares, and also the maximum capacity, in order to calculate the percentage of free space. Thanks anyway.
Reply
#89
Just realised there is a dedicated thread for add-ons API feature request. Don't know if this was suggested, but here is a feature I requested a couple of years ago. Forget the original post, read through the replies (3rd post and down) for the suggested view_type idea.
http://forum.xbmc.org/showthread.php?tid=125083
Reply
#90
(2013-02-05, 18:23)sphere Wrote: 1.4 External Subtitle/Audio-Streams
It should be possible to be able to set one (or multiple) subtitle and/or audio streams before playback. At the moment you need to use a subclassed player which adds an additional subititle stream after playback has been started.
Something like:
PHP Code:
li ListItem(icon=foopath='http://server.com/video.flv')
li.addProperty(['subtitle-file''http://server.com/video_subtitle.srt'])
li.addProperty(['audio-file''http://server.com/video_audiotrack.mp2']) 

+1 for this. At the moment Youtube plugin is unable to play high quality streams because high quality streams are split into video and audio stream, not one.
Reply
  • 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8

Logout Mark Read Team Forum Stats Members Help
My 30 Add-on API wishes6
This forum uses Lukasz Tkacz MyBB addons.