•  Previous
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 8
  • Next 
 
Thread Rating:
  • 5 Vote(s) - 4.6 Average
My 30 Add-on API wishes
#46
This is how I use translation in my add-ons:
https://github.com/dersphere/plugin.vide...r/addon.py
See STRINGS-dict (Line 27) and _ (underscore) function (Line 471).

Then I can use translated string with the underscore-method using strings or placeholders as string-ids.
My GitHub. My Add-ons:
Image
Reply
#47
But you still need to maintain a correct map of strings to id. And the <lang>.xml files as well. In my opinion much of the point of string keys is gone then. Perhaps even easier to mess up now since you have another set of string you have to make sure is correct.
Reply
#48
(2013-04-21, 10:33)sphere Wrote: This is how I use translation in my add-ons:
https://github.com/dersphere/plugin.vide...r/addon.py
See STRINGS-dict (Line 27) and _ (underscore) function (Line 471).

Then I can use translated string with the underscore-method using strings or placeholders as string-ids.
Of course, this is a lot more practical when you don't have over 400 strings in your script Smile
(2013-04-21, 11:29)takoi Wrote: But you still need to maintain a correct map of strings to id. And the <lang>.xml files as well. In my opinion much of the point of string keys is gone then. Perhaps even easier to mess up now since you have another set of string you have to make sure is correct.
I would say that the main point of string keys is code readability. Of course I could comment my code better, but then people would mistake me for a good programmer Smile
But I do think it's best if the code is readable without comments as much as possible.
Reply
#49
(2013-04-21, 20:49)ruuk Wrote: But I do think it's best if the code is readable without comments as much as possible.

That was nr.1, 2 and 3 that my professors kept hammering on. Write code that some one else can read and do comment when needed.
after that was nr.4 and so on Smile

I agree that having another string mapping your addon is nice when you have a small plugin/script but mistakes can easily be made if you have a more numerous number.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#50
Great topic that makes it easy to track everything.

@sphere i hope you can add the external subtitle suffix to this topic.
link
link
Frontend : Raspberry Pi 2, Google Nexus Player
Ziggo TV Channel Logo Pack (Dutch)
Reply
#51
(2013-05-05, 10:08)Baswazz Wrote: Great topic that makes it easy to track everything.

@sphere i hope you can add the external subtitle suffix to this topic.
link
link

Both isn't Add-on API related so I don't think that it's best placed here Wink
My GitHub. My Add-ons:
Image
Reply
#52
4.1
I am new to XBMC and I am not a developer, so feel free to let me if this is a crappy idea. Could 4.1 be done with category tags that the plugin developers define? Filtering for just "News" and "Video" would get the "subcategories" you want while allowing add-ons to appear in more than one "subcategory". Developer defined tags would allow for expansion into new categories. I would love to see the user interface use drop-downs pre-populated with existing tags and Boolean check-boxes to include or exclude tags. New tags could be automatically added to the drop-downs after they meet a population threshold e.g. >20 add-ons are tagged "3D".
Reply
#53
5.1 and 5.1b would be killer for me.

I interface with OAuth APIs, and since these normally carry nonces and timestamps, they cannot be re-used and expire after a certain time.

Some async mechanism to supply the URL both in the "thumbnail" attribute of a ListItem and in the "path" attribute when listing a SlideShow would be perfect.
Reply
#54
(2013-07-31, 18:43)EDevil Wrote: Some async mechanism to supply the URL both in the "thumbnail" attribute of a ListItem and in the "path" attribute when listing a SlideShow would be perfect.

This is already possible.
In Detail:
- You can use setResolvedUrl() for the path which is async (your plugin will be called to retrieve the playpath when needed).
- You can write an image plugin and use its plugin url as slideshow path (combine with above).

But anyway, its sad that there is no real progress on 27/30 api wishes.
My GitHub. My Add-ons:
Image
Reply
#55
Nice list. I'm sure the quality of a lot of add-ons would improve if the API could provide this features. I have some ideas I want to add:


2.1 always included skin graphics
The functions you listed (search, next page, ...) are needed in almost every video add-on. They are purely managed by the add-on, while XBMC could do this in a uniform way. The position and name of those menu items varies between various add-ons for example. The search function could be provided in an extra field.

5.1a Async listitems infolabels
Almost all of my video add-ons could get proper plots if this would be possible.

5.1b Or a general async (similar to lazyloading) workflow maybe?
I think the user experience would gain a lot from this. This could replace the "next page" item completely. Just load more entries if the bottom of the list is reached. Some websites display less than ten videos per page. Browsing back to the root of the add-on is a pain in the neck if you called the next page button more than once.


I have an additional request. I'd like to have a way to get the informations from the file header of the playing video. Some CDNs send informations in the video file header which have to be processed by the addon to keep the stream running. There is an workaround involving a local proxy, but it's not working 100% in my implementaion. Low performance platforms like the ATV2 or the Raspberry Pi struggle to play such streams.
Reply
#56
(2013-08-04, 04:04)membrane Wrote: Some websites display less than ten videos per page. Browsing back to the root of the add-on is a pain in the neck if you called the next page button more than once.

You can already do anything against this: Set the updateListing argument to endOfDirectory. For examples see one of my more advanced add-ons.
My GitHub. My Add-ons:
Image
Reply
#57
There are news regarding 8.1 (actions by name in onAction()/constants for action IDs).
See here for details.

Thanks Fice!
My GitHub. My Add-ons:
Image
Reply
#58
5.14 A non selectable infolabel
When scraping a site, it would be useful to have a label that can be included to help distinguish a sub category without the label being selectable\clickable. That label would be skipped, when moving down a list. There would need to add another page for each sub category, especially if the sub category had only a few items in it. It would also be useful to be able to hide these labels if different sorting is used.
Examples could be a date, ratings etc.
Reply
#59
Great ideia.. I usually create a empty dir but this perfect.
Reply
#60
8.1 got merged yesterday Smile
https://github.com/xbmc/xbmc/pull/3059
Reply
  •  Previous
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 8
  • Next 



My 30 Add-on API wishes4.65