Posts: 245
Joined: Nov 2012
Reputation:
7
Wimpie
Senior Member
Posts: 245
2016-06-10, 11:32
(This post was last modified: 2016-06-10, 11:48 by Wimpie.)
Hi,
I need to include a small animation with my addon (about 20 kbyte).
I would like to try to get my addon accepted in the official repo (when it's complete).
wiki:
"add-ons should store all their data in their own subfolder inside the addon_data directory. Access (read/write/delete) to any other files / folders is not allowed by default. Exceptions to this rule may be granted in specific cases only."
Is there a way to copy the file to "special://userdata/addon_data/myaddon/myfile.mp4"? In other words, how do I get my file copied to this location while installing the addon?
Is it allowed to keep the file at "special://home/addons/myaddon/resources/myfile.mp4"? I just play it, I don't want to write to the file.
Some other solution?
What is the preferred solution?
Thanks
Add-on :
Bluray iso utils Rewrite of BR_iso_enhancements
Add-on :
BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Posts: 245
Joined: Nov 2012
Reputation:
7
Wimpie
Senior Member
Posts: 245
2016-06-10, 11:53
(This post was last modified: 2016-06-10, 11:59 by Wimpie.)
The wiki says it should be there? see first post...
This is a dummy animation (12 seconds of showing a black screen).
I need it to get an onplaybackstarted event from xbmc.player.
It is used as the first line in a ".strm" file, and I redirect the player then to another animation to play (a rewrite of my currrent addon for bluray iso support).
I just keep it then as "special://home/addons/myaddon/resources/myfile.mp4"...
Add-on :
Bluray iso utils Rewrite of BR_iso_enhancements
Add-on :
BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Posts: 292
Joined: Mar 2012
Reputation:
11
tadly
Team-Kodi Member
Posts: 292
I see...
I assume than that you want to display the dummy animation because whatever comes next takes some time before being playable?
In that case I think it'd be better to show a progress-dialog of some sort letting the user know that the addon "Is processing the request"
e.g. xbmcgui.DialogProgressBG should work for that (leaving the user the option to keep using kodi)
or xbmcgui.DialogProgress which would show a popup allowing the user to cancle the operation (if you implement it properly that is)
Posts: 245
Joined: Nov 2012
Reputation:
7
Wimpie
Senior Member
Posts: 245
2016-06-10, 12:07
(This post was last modified: 2016-06-10, 12:11 by Wimpie.)
Euh, no can do...
I really need the onplaybackstarted event. Playback of the dummy animation is stopped as soon as detected, user should see nothing of that dummy animation. But it is used to create a onplaybackstarted event. Otherwise I can't intercept the start of the playing of the .strm file and redirect Kodi to the correct bluray streamlist.
So, "special://home/addons/myaddon/resources/myfile.mp4" is OK? Would not give probs later when trying to get this addon in the repo?
thanks
Add-on :
Bluray iso utils Rewrite of BR_iso_enhancements
Add-on :
BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Posts: 292
Joined: Mar 2012
Reputation:
11
tadly
Team-Kodi Member
Posts: 292
As there is no copyright involved and it's rather small, I think it's okay.
And as long as this add-on doesn't do any form of piracy, you should be good.
As we don't have source code yet nor know what exactly this add-on will do,
I can't guarantee anything though.
This needs to be seen once you submit it to the repository.
Posts: 1,506
Joined: Nov 2013
And the addon_data requirement is for written data. The addon can be hosted on ro storage, eg android