Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Make resource content available via api? Make sense? Application examples please
#1
Question 
I suggest the question because I was offered the content of my resource addon also via API available. I understand very well why should make (Special/Inofficial) Artwork Type Images available via API, but what purpose this can have for Resource Images is still a mystery to me. Maybe something escapes me from a technical point of view, i ask you for opinions or technical examples:

Hopefully, as everyone knows, the difference between images are artwork types, and images are resources (from addons):

Artwork Types: poster, fanart, clearlogo, clearart, banner, landscape, characterart for tvshows
Inofficial Artwork Types: animatedposter, animatedfanart, characterart for movies (all 3 also available via API from KyraDB thanks @rschiks )

Resources: Studio Logos (White or Colored), Genre Icons, Genre Fanart, Country Icons, Language Flags, and so on...
___
I'm a big fan of pioneering in kodi and always taking a step forward. That's why I understand the concept of make Inofficial Artwork Types via API available very well:
  • Skin intregration is simple, (Inofficial) Special Artwork Types are supported in kodi core, no more else modification needed, just $INFO[ListItem.Art(chooseyourartworktypename)], that's the whole magic.
  • To read into Kodi just ArtworkBeef is needed, on Kodi Leia it's also functional without ArtworkBeef with modifying advancedsettings.xml (look 2.3.14.1)
(This "read into Kodi" variant isn't necessary for animatedposter and animatedfanart when Skin has implemented it with SkinHelperService)
  • From now on, the Special Artwork type would work in the skin, but you still have to manually download and place the files. That's where the API comes in: One way would be to integrate the API into Media Manager, another option would be to integrate it into ArtworkBeef or maybe SkinHelperService.
Ok, now I have explained enough why it makes sense to make Special Artwork Types images available through an API.
____
But now it's about resource images, in particular, this Image Resource Addon is about: Actresses PNG's resource addon
As far as I know Resources work completely different than Artwork Types. Artwork types are tied to a certain medium (movies, series, season, episodes), but resources are only tied to one value, in the skin it's just matched to a label.
That's why the usefulness of make resources available over api is a bit mystery to me. Please help me on the jumps if I have overlooked something. If there is a meaningful implementation concept, please describe in more detail.
____
Most thoughts are addressed @rschiks, i really hope the API will implemented in other applications soon, like the idea!
Most member supported the addon are @manfeed and @Captain_Pike maybe you can also give a statement.
I know here in the forum are also member with API knowledge @"marcelveldt" @rmrector @Angelinas @vbat99 
Maybe my favorite Team Kodi @Karellen have some thoughts.

Great thanks in Advance.
Reply
#2
I just sat with a beer with my coding friends and talked about it a bit. We just can not come up with a green branch as that should work and it just raises further questions.

The resource addon is constantly updated and images are exchanged with better quality and other adaptations. How do you want to ensure that the content constantly matches? I do not have to be a clairvoyant that it automatically breaks up here. And that would lead to confusion. One possibility would be to abandon the resource addon and offer content only through the API. If so, do i have the same implementation options as they are now with the resource addon?

Do you want to offer the PNG's central via API like now in the resource addon or decentralized allocate to a movie? (similar to actor thumbs)
To offer the PNG's with an API is not a problem on itself, but how to supply/implement to kodi?

Option 1:
As a artwork type? No way, makes no sense.

Option 2:
Similar like SkinHelperService calling animated artwork, downloading via webservice automatic and caching to script.module.metadatautils if there is a match in the skin?
Advantages:
One would not have to update the content of the addon anymore.
Only the content that is needed is loaded and not everything as in the resource addon.
Disadvantages:
Any service (for example SkinHelper) would have to integrate that.
You would then also need to upgrade the skins. @"chrissix"  current implementation style is totally simple and can also be done for noobs, @manfeed implementation code is a bit more heavy but nice.
Another disadvantage is the Internet connection is necessary, and any use of SkinHelper especially in conjunction with automatic download of webservices which affects the skin performance.

This way it would work the same as the resource addon, but only if an image is downloaded when requested in the skin.

Option 3:
Similar like the .actors folder?
A nice thought, but that's defined in the kodi core and called in skin with $INFO[ListItem.Icon]
Without adjustments in the kodi core, no chance.
____
We could not have thought of much more. An implementation similar to option 2 would still be the most promising, much like SkinHelper webservice implementation offers: https://github.com/kodi-community-addons...Webservice
Instead of  now "ListItem.Label,resource://resource.images.actorart/,.png" a webservice code similar like: http://localhost:52307/getthumb&title=$INFO[ListItem.Label], but adapted that it's linked to your API. Only SkinHelperService maintainer will know further more of useful implementing options... i hope he gives a statement.

@rschiks Which type of implementation would you have thought of?
Reply
#3
(2019-04-28, 16:33)chrissix Wrote: But now it's about resource images, in particular, this Image Resource Addon is about: Actresses PNG's resource addon
As far as I know Resources work completely different than Artwork Types. Artwork types are tied to a certain medium (movies, series, season, episodes), but resources are only tied to one value, in the skin it's just matched to a label.
That's why the usefulness of make resources available over api is a bit mystery to me. Please help me on the jumps if I have overlooked something. If there is a meaningful implementation concept, please describe in more detail.

I completely agree with this comment, I know that nowadays we get things in Kodi that we couldn’t think of some years ago, in addition Kodi Matrix is here and maybe it could bring new tools to skinners that we know nothing yet, but as things are right now I only see feasible the resource addon option; my only hope is that it could be available through the official repo soon, as I have already added support to it in my skin Aeon Tajo...
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#4
(2019-04-28, 23:55)manfeed Wrote: it could be available through the official repo soon
That might take a while: See my Signature.
I've never had a point of contact with it and i'm unable do further on my own. 
I am currently gave up and waiting for a "volunteer" to help me on the jumps.
But then there is no certainty, then it can still be rejected.
Reply
#5
(2019-04-28, 23:23)Captain_Pike Wrote: Another disadvantage is the Internet connection is necessary, and any use of SkinHelper especially in conjunction with automatic download of webservices which affects the skin performance.

I have been skinning for some years now, at the beginning I used all kind of addons, but now I try to use the fewer the better... why?

- They tend to break easily
- The maintainer gets tired and stops maintenance
- They affect, sometimes heavily, the skin performance

That’s why I now prefer to add my artwork locally beside my movie, and use the advancedsetting.xml option, that soon in Matrix will not even be required I think...

Another option would be that some Media Manager could scrape and download the images of actors the same way that extra fanarts... I mean adding the images with the file names actor1, actor2, actor3, etc... and putting them beside the file movie... That way they could be retrieved with ListItem.Actor1, ListItem.Actor2, etc... The drawback that I see it’s to link that image to the actor name... Huh

Obviously it’s only my opinion, and if new and better options become available I will be more than happy adapting my skin accordingly... For the time being the resource addon option works well for my needs...
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#6
I’m a kind of lazy. If I want a feature I should just be able to select the option and it should work.
I certainly don’t want to manually update something every week. This should be done automatically.

So for me I want to start Kodi, select my favorite skin and configure my preferences and be done with it.
If I enable the usage of character art (or actresses art) it should be downloaded automatically (once) and stored locally. If multiple art options are available I’d like to be able to select my favorite image.

Plain and simple :-)

So how can we achieve this?

Artwork Beef (or skinhelperservice) looks ideal for my situation. It automatically downloads and stores it.

Sorry to sound a bit blunt....for me it helps to first describe what I want to achieve and then work towards a solution.
Proud owner of comics42.shop 
Reply
#7
(2019-04-28, 16:33)chrissix Wrote: That's why the usefulness of make resources available over api is a bit mystery to me. Please help me on the jumps if I have overlooked something. If there is a meaningful implementation concept, please describe in more detail.

In some of these cases the resource add-on approach doesn't work well, and something like Kodi's artwork handling would work better; just consider the actor that "certain medium" instead of a movie or series. Actor artwork is an ever-growing collection - good luck ever making all images for everyone's top 100 actors list, and there will always be new folks joining the list - so IMO it's not particularly suited for the resource repo.
Reply
#8
(2019-04-30, 06:41)rmrector Wrote:
(2019-04-28, 16:33)chrissix Wrote: That's why the usefulness of make resources available over api is a bit mystery to me. Please help me on the jumps if I have overlooked something. If there is a meaningful implementation concept, please describe in more detail.

In some of these cases the resource add-on approach doesn't work well, and something like Kodi's artwork handling would work better; just consider the actor that "certain medium" instead of a movie or series. Actor artwork is an ever-growing collection - good luck ever making all images for everyone's top 100 actors list, and there will always be new folks joining the list - so IMO it's not particularly suited for the resource repo.
So how would you approach it? Obviously not the resource way.
Proud owner of comics42.shop 
Reply
#9
(2019-04-30, 06:41)rmrector Wrote: there will always be new folks joining the list - so IMO it's not particularly suited for the resource repo.
I know, resource content should be more static content than dynamic content. However, there are exceptions such as the Studio Icons resources.
Ok, so your opinion is it's wasting breath trying making a GitHub PR.
Quote:So how would you approach it? Obviously not the resource way.
I'm also very curious about an implementation concept!
Reply
#10
(2019-04-30, 06:41)rmrector Wrote: and something like Kodi's artwork handling would work better
But how should that work? @"chrissix" & @manfeed has described the most important difference artwork and resources work in skin very well:
Quote:...Resources work completely different than Artwork Types. Artwork types are tied to a certain medium (movies, series, season, episodes), but resources are only tied to one value, in the skin it's just matched to a label.
Or am I missing something here?
Reply
#11
(2019-04-29, 00:07)chrissix Wrote:
(2019-04-28, 23:55)manfeed Wrote: it could be available through the official repo soon
That might take a while: See my Signature.
I've never had a point of contact with it and i'm unable do further on my own. 
I am currently gave up and waiting for a "volunteer" to help me on the jumps.
But then there is no certainty, then it can still be rejected. 

As it contains the images inside itself it is unlikely to ever get into the official repository as too many chances of copyright problems.
Reply
#12
(2019-04-30, 16:10)DNKK Wrote: As it contains the images inside itself it is unlikely to ever get into the official repository as too many chances of copyright problems.
Yes, I share your concerns! But keep in mind that the Studio Icon resources images are all very well copyright protected too but still can be used with GPL2 license.
The same hope that it's no copyright infringement with GPL2 could exist also here.
Reply
#13
(2019-04-30, 15:07)chrissix Wrote: there are exceptions such as the Studio Icons resources.
Ya, and FWIW I don't think studio images are well suited for resource add-ons either, but the images are small and it's much better than the previous alternative - many skins used to include their own large collection of studio images, with a bunch of duplicates across them.
 
(2019-04-30, 15:07)chrissix Wrote: Ok, so your opinion is it's wasting breath trying making a GitHub PR.

Smile I wouldn't say that exactly, but for the long term I do suggest they be provided from an API instead.

For the short term I think the current resource add-on could be simplified to one big zip that is just extracted to a folder, then point a skin setting to that folder instead of the resource add-on. While this collection is still changing rapidly, update zips can be posted that contain new and updated images since the last zip, and it is easier to manually add or replace images in a shared folder than in Kodi's add-on directory.

A possible second stage of this once there is a web-service API is a simple add-on for Kodi that can download images from the API to that same folder based on the Kodi library.
Reply
#14
(2019-04-29, 00:07)chrissix Wrote:
(2019-04-28, 23:55)manfeed Wrote: it could be available through the official repo soon
That might take a while: See my Signature.
I've never had a point of contact with it and i'm unable do further on my own. 
I am currently gave up and waiting for a "volunteer" to help me on the jumps.
But then there is no certainty, then it can still be rejected.  

we do have an easy way out for people unfamiliar with github...

1. create a new issue here: https://github.com/xbmc/repo-resources/issues
2. fill in these details: https://kodi.wiki/view/Submitting_Add-ons#Issue_ticket
3. you're done ;-)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#15
(2019-05-01, 09:37)ronie Wrote: 3. you're done ;-)
Great thanks @ronie 
I hope i have done everything right so far:
https://github.com/xbmc/repo-resources/issues/76
Reply

Logout Mark Read Team Forum Stats Members Help
Make resource content available via api? Make sense? Application examples please2
This forum uses Lukasz Tkacz MyBB addons.