Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin.video.embycon] 1.3.15 #1278

Closed
wants to merge 453 commits into from
Closed

[plugin.video.embycon] 1.3.15 #1278

wants to merge 453 commits into from

Conversation

faush01
Copy link

@faush01 faush01 commented Jun 24, 2017

Description

Addon to display and play back media libraries from the Emby Server.

Checklist:

  • My code follows the add-on rules and piracy stance of this project.
  • I have read the CONTRIBUTING document
  • Each add-on submission should be a single commit with using the following style: [plugin.video.foo] v1.0.0

Additional information :

  • Submitting your add-on to this specific branch makes it available to any Kodi version equal or higher than the branch name with the applicable Kodi dependencies limits.
  • add-on development wiki page.
  • Kodi pydocs provide information about the Python API
  • PEP8 codingstyle which is considered best practice but not mandatory.
  • This add-on repository has automated code guideline check which could help you improve your coding. You can find the results of these check at Codacy. You can create your own account as well to continuously monitor your python coding before submitting to repo.
  • Development questions can be asked in the add-on development section on the Kodi forum.

MartijnKaijser and others added 30 commits March 9, 2016 16:04
…anada-3.0.1

[plugin.video.slice.canada] 3.0.1
…e.canada-3.0.2

[plugin.video.showcase.canada] 3.0.2
[plugin.video.animeftw] - removed because it is against our non-pirac…
[plugin.video.tviplayer] 0.1.0
[plugin.video.tviplayer] 0.2.0
[plugin.video.fatstone] 1.0.1
[plugin.video.wabc] 3.0.3
@faush01 faush01 changed the title plugin.video.embycon - 1.3.6 [plugin.video.embycon] 1.3.12 Jun 29, 2017
@faush01 faush01 changed the title [plugin.video.embycon] 1.3.12 [plugin.video.embycon] 1.3.15 Jul 4, 2017
@faush01
Copy link
Author

faush01 commented Jul 6, 2017

Is this the correct place to submit addons?
Been a week or so since submission, just wondering if I have submit this correctly.

If you are looking for more info about the addon you can check the emby server forums:
https://emby.media/community/index.php?/topic/46651-embycon/

@tadly
Copy link
Member

tadly commented Jul 6, 2017

It's the right place and I started reviewing it too.
This just takes time with bigger add-ons and I don't have as much time to spend on reviewing lately.

version="1.3.12"
provider-name="Team B">
<requires>
<import addon="xbmc.python" version="2.1.0"/>

This comment was marked as spam.

<website>https://emby.media/community/index.php?/topic/46651-embycon/</website>
<source>https://github.com/faush01/plugin.video.embycon</source>
<summary lang="en">View and play your Emby media library.</summary>
<description lang="en">An addon to allow you to view and playback your Emby (www.emby.media) Movie and TV Show collection.</description>

This comment was marked as spam.

details['title'] = listItemName

if kodi_version > 17:
list_item = xbmcgui.ListItem(listItemName, iconImage=thumbPath, thumbnailImage=thumbPath, offscreen=True)

This comment was marked as spam.

def addMenuDirectoryItem(label, path, folder=True, thumbnail=None):
li = xbmcgui.ListItem(label, path=path)
if thumbnail is None:
thumbnail = "special://home/addons/plugin.video.embycon/icon.png"

This comment was marked as spam.

def error(self, msg):
if (self.level >= 0):
try:
xbmc.log(self.format(msg, "ERROR"), level=xbmc.LOGNOTICE)

This comment was marked as spam.

def debug(self, msg):
if (self.level >= 2):
try:
xbmc.log(self.format(msg, "DEBUG"), level=xbmc.LOGNOTICE)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

skin_views = defaultViewData.get(skin_used, None)
log.info("Current skin views: " + str(skin_views))
if skin_views is None:
xbmcgui.Dialog().notification(__addon__.getAddonInfo('name'), i18n('skin_not_supported') % skin_used, icon='special://home/addons/plugin.video.embycon/icon.png')

This comment was marked as spam.

log.error("Exception in sending client meta info: " + str(error))

try:
while not xbmc.abortRequested:

This comment was marked as spam.

play_info = json.loads(play_data)
playFile(play_info)

xbmc.sleep(1000)

This comment was marked as spam.

addonPath = __addon__.getAddonInfo('path')
skin_view_file = os.path.join(addonPath, "resources", "data", "skin_views.json")
log.info("Loading skin views form: " + skin_view_file)
dataFile = open(skin_view_file, 'r')

This comment was marked as spam.

@tadly
Copy link
Member

tadly commented Jul 7, 2017

A few more things.

  1. As of our addon-rules, your icon should not have transparency.

  2. The whole GoogleAnalytics thing. As far as I can tell there's no way of opting out and personally I'd prefer it to be opt-in all together. I asked the team what they think and will come back to you on that. But having a way of turning it on/off in the settings will be the minimum.

  3. Can you please explain the use of default_views.json to me? Reason being that we don't like addons changing the current view.
    Instead, listitems should be prepared properly (setting media-types etc.) and skins should work off of those information's. With the limited time I have I couldn't quite figure out what exactly it is you're are doing so you shall explain it :)

@faush01
Copy link
Author

faush01 commented Jul 7, 2017

1 - I will update the icon

2 - You can opt out in the settings, under advanced "Log error and Anonymous metrics" perhaps this need qualification "Remotely Log Errors and Anonymous Metrics"
Adding remotely should clear that up.

3 - By default no view is set, it leaves it up to the Skin and Kodi.
However this is not ideal as even when you set the correct media type in the addon for the list items and want to set a new view for say all your seasons or episodes you need to go in and set the view you want in each and every path, i.e. go into tv show X and set the seasons to wide list, set the episodes for season one to wall, go into season 2 and set the view to wall etc, each and every location needs to have the view set.
This option lets you set the view type for each media Type and it is applied if you view media of that type, it does this on a Skin by Skin basis, that is the view IDs need to be available in the defined skin views file and then you need to go inot the addon menu and select Set Default Views to set the views you want for each media type for your selected skin.

@tadly
Copy link
Member

tadly commented Jul 7, 2017

Regarding Analytics...
Just got response form a member and he pointed me to our Addon-Rules where it says:

directly using analytics (Google Analytics for example) from within add-ons is not allowed. This should be handled server side by using user-agent.

So for use to be able to accept this add-on the whole analytics stuff needs to be removed

@faush01
Copy link
Author

faush01 commented Jul 7, 2017

Can you explain what this means

This should be handled server side by using user-agent.

@tadly
Copy link
Member

tadly commented Jul 7, 2017

Regarding point 3. I know those problems (Been there myself with a google music plugin) however we do not accept this as of our Addon-Rules:

Plugins should not force certain skin viewtypes on their own. They should set the correct media content from which the correct skin view type is automatically provided.

As a personal note:
We (kodi) try to constantly improve the core and since krypton I don't have to set any views for my google music add-on anymore as the defaults (due to properly set mediatypes etc.) are just fine.

fixed some grammar

@tadly
Copy link
Member

tadly commented Jul 7, 2017

Can't really explain it as I didn't write that rule myself but I'd assume this means that in your case, emby itself should do analytics, not the kodi add-on.

Same would apply to other add-ons like plex, gmusic etc.

@faush01
Copy link
Author

faush01 commented Jul 7, 2017

Ok, so to move forward I would need to:

  • remove all remote error and metrics logging
  • revamp the internal addon/kodi logging
  • remove the default view type setting

Anything else?

the first two are internal and only effect devs, the last one I would run past the user base on the emby forums to see if it was a deal breaker or not.

@tadly
Copy link
Member

tadly commented Jul 7, 2017

Sounds good, yes.

Regarding the last point. Maybe turn the custom-view types of and test your add-on with estuary.
The default views estuary picks should be just fine (unless you forgot to set a mediatype etc. which you should double/tribble check at this point).

If estuary looks good but other skins don't it suggests that (whatever skin it may be) needs some work to properly support all mediatypes.

@faush01
Copy link
Author

faush01 commented Jul 7, 2017

It still only sets a view for a particular path, from my understanding the view is stored in the DB for each path. This means that for each and every season or episode list I wanted to set a view for I would have to go in and set that view.
As I pointed out above this would need to happen for each path in the the library.

I am sure the addon is setting the media type correctly, well actually you can tell me you can see the code in the pull request, look for the getContent() call in functions.py

How should it work, am I seeing the correct functionality of the default Kodi or is something wrong?

@tadly
Copy link
Member

tadly commented Jul 7, 2017

I know the problem that arises (as mentioned before, I hit it myself) and you are right in assuming that the user would than have to change the view for every single element (as the path changes due to ids etc.)

My position currently is to just enforce the rules we have.
However I personally do not like this rule either and asked internally if we can make an exception.

@faush01
Copy link
Author

faush01 commented Jul 7, 2017

So if this is a know issue why are addons not allowed to set the view?
What was the original reasoning behind this? who came up with this?

@tadly
Copy link
Member

tadly commented Jul 7, 2017

It's not an issue, it's just a limitation which has been improved upon over the years and will be further improved in coming years.
Forcing a viewtype is considered to be hacky'isch as kodi will load a specific view (depending on the content) first and only after you're able to force-overwrite it again.
That's a bad sequence of events (as you can imagine).

I bet there're other reason too though...

@faush01
Copy link
Author

faush01 commented Jul 7, 2017

ok point taken. I will work on this over the weekend.

@tadly
Copy link
Member

tadly commented Jul 7, 2017

I'm still discussion internally but it's not looking that great, sorry.
The gist of it is that viewtypes and their codes are skin-dependent hence it's bad for add-ons to change it.

@faush01
Copy link
Author

faush01 commented Jul 8, 2017

I completely understand you dont want display decisions being made by addons, that really should be skins that do that.

Perhaps there should be a built in way for Kodi to apply a Skin View for all content of that type.
i.e.
You navigate to episodes, there is an option (built in function) that you can select that for all content of the type you are currently viewing you use the current view ID from that point on.
This would be very similar to the current approach where the Skin sets the default view for best user experience but if the user wants they can say use this view type for all media of this type from now on.

@faush01 faush01 mentioned this pull request Jul 8, 2017
3 tasks
@faush01
Copy link
Author

faush01 commented Jul 8, 2017

I some how screwed up this pull request. I have created another one

#1309

All the requested changes should now be in the new pull request.
This one can be closed.

@faush01
Copy link
Author

faush01 commented Jul 10, 2017

I am going to close this one as it us redundant now, see #1309 for the new pull request with all the changes in it.

@faush01 faush01 closed this Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet