Jump to content


Photo

Crashing while pushing the menu button after using mediaportal


  • Please log in to reply
55 replies to this topic

Re: Crashing while pushing the menu button after using mediaportal #21 dhwz

  • Senior Member
  • 228 posts

+20
Neutral

Posted 16 May 2016 - 21:00

@WanWizard

I didn't say we check if it is installed :)

We just do it and if we get an exception (this usually only happens when mediaplayer is not installed) we recreate it.

And thats the root cause PLi removed useAlternateUserAgent from PLi E2 sources, thats why we get the exception -> recreation of the mediaplayer config section.

		try:
			config.mediaplayer.useAlternateUserAgent.value = True
			config.mediaplayer.alternateUserAgent.value = self.useragent
			config.mediaplayer.useAlternateUserAgent.save()
			config.mediaplayer.alternateUserAgent.save()
			config.mediaplayer.save()
		except Exception, errormsg:
			config.mediaplayer = ConfigSubsection()
			config.mediaplayer.useAlternateUserAgent = ConfigYesNo(default=True)
			config.mediaplayer.alternateUserAgent = ConfigText(default=self.useragent)

Edited by dhwz, 16 May 2016 - 21:01.


Re: Crashing while pushing the menu button after using mediaportal #22 littlesat

  • PLi® Core member
  • 57,631 posts

+709
Excellent

Posted 16 May 2016 - 21:01

Read the LICENSE


This plugin is open source but it is NOT free software.
 
This plugin may only be distributed to and executed on hardware which
is licensed by Dream Property GmbH. This includes commercial distribution.
In other words:
It's NOT allowed to distribute any parts of this plugin or its source code in ANY way
to hardware which is NOT licensed by Dream Property GmbH.
It's NOT allowed to execute this plugin and its source code or even parts of it in ANY way
on hardware which is NOT licensed by Dream Property GmbH.
 
This applies to the source code as a whole as well as to parts of it, unless
explicitely stated otherwise.
 
If you want to use or modify the code or parts of it,
you have to keep OUR license and inform us about the modifications, but it may NOT be
commercially distributed other than under the conditions noted above.
 
As an exception regarding execution on hardware, you are permitted to execute this plugin on VU+ hardware
which is licensed by satco europe GmbH, if the VTi image is used on that hardware.
 
As an exception regarding modifcations, you are NOT permitted to remove
any copy protections implemented in this plugin or change them for means of disabling
or working around the copy protections, unless the change has been explicitly permitted
by the original authors. Also decompiling and modification of the closed source
parts is NOT permitted.
 
Advertising with this plugin is NOT allowed.
For other uses, permission from the authors is necessary.r

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Crashing while pushing the menu button after using mediaportal #23 littlesat

  • PLi® Core member
  • 57,631 posts

+709
Excellent

Posted 16 May 2016 - 21:06

And now see the what happens in e.g. in itunestrailers.py but also on a different place exact the same...

 

config.mediaplayer.useAlternateUserAgent and config.mediaplayer.alternateUserAgent do not exists of course... se we go to the except... and then config,mediaplayer is reconfigured... all existing config parameters are gone.... First noticed via the config.MediaPlayer.onmainmenu

 

Another solution we could make is add the UserAgent config values what are doing nothing.... 

                try:
                        config.mediaplayer.useAlternateUserAgent.value = True
                        config.mediaplayer.alternateUserAgent.value = self.useragent
                        config.mediaplayer.useAlternateUserAgent.save()
                        config.mediaplayer.alternateUserAgent.save()
                        config.mediaplayer.save()
                except Exception, errormsg:
                        config.mediaplayer = ConfigSubsection()
                        config.mediaplayer.useAlternateUserAgent = ConfigYesNo(default=True)
                        config.mediaplayer.alternateUserAgent = ConfigText(default=self.useragent)

Edited by littlesat, 16 May 2016 - 21:09.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Crashing while pushing the menu button after using mediaportal #24 dhwz

  • Senior Member
  • 228 posts

+20
Neutral

Posted 16 May 2016 - 21:14

That is what I've already told you in December when you removed the old config settings way for modifiying the useragent header and introduced the your new url header way.  :P

 

http://forums.openpl...e-4#entry519722



Re: Crashing while pushing the menu button after using mediaportal #25 littlesat

  • PLi® Core member
  • 57,631 posts

+709
Excellent

Posted 16 May 2016 - 21:18

Then look here...

 

https://github.com/O...c64d537c17bfb48

 

I suggest a smarter way to set the user-agent... All credits to mx3L for his opensource minded offer!. 

 

No config required anymore for this one feature as you just put the agent into the specific service reference

 

And still reconfiguring a ConfigSubsession clears the complete subsession so all previouly defined keys are deleted. I think this is not done... And note you only define two new keys...


Edited by littlesat, 16 May 2016 - 21:24.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Crashing while pushing the menu button after using mediaportal #26 mirakels

  • Forum Moderator
    PLi® Core member
  • 7,604 posts

+62
Good

Posted 16 May 2016 - 21:38

@dhwz:

Ignoring the whole discussion about blame...

 

I learned from object oriented programming trainings that it is not done to create objects on behalf of a different class at this level.

Mediaplayer is responsible for the mediaplayer config section. So if it is there or not, one should never do a config.mediaplayer = ConfigSubsection()  anywhere outside the mediaplayer plugin.

 

I would think that you can safely assume that mediaplayer does not exist or the config item is not in use if using the config item would crash.

What is the point in creating a config section with a specific item when you now already know it does not exist or will not be used?

 

So

try
    config.mediaplayer.useragent = myvalue
except
    pass 

should be enough I think.


Geen wonder... Had slechts een dm7000, maar wel ook een rotor. eigenlijk al een tijdje ook een dm600 en dm7025. Maar nu kijkend met een et9000 en vuduo

Re: Crashing while pushing the menu button after using mediaportal #27 dhwz

  • Senior Member
  • 228 posts

+20
Neutral

Posted 16 May 2016 - 21:43

@mirakels

I've already explained that not the mediaplayer itself is using this options, but E2 does. The also the last posting of littlesat, where PLi modified that code part in E2 sources.



Re: Crashing while pushing the menu button after using mediaportal #28 littlesat

  • PLi® Core member
  • 57,631 posts

+709
Excellent

Posted 16 May 2016 - 21:53

Indeed the mediaplayer is not using these configs at all... It was long long time ago induced here... and not by our team that time...

 

see here: https://github.com/O...3049acc1ff80bcc

 

But basically using the config.mediaplayer was already incorrect here. See post #26 for the clarification... And that was clearly not your fault and also not ours... ;). And why did they that time had enable/disable the UserAgent while an empty string could also do the disable...???

 

We removed that part as we added it to the service reference... I suggest this is also the most clean solution.... And even for you this is more easy as you can simply add  a useragent to a stream that depends on it.

 

P.S. At least from now on I understand why you did this.... ;)... 

P.S.2 And I understand this is not backwards compatible... but why should we for something that was wrong from the beginning.... (at least using the config.mediaplayer in the e2 binary for the UserAgent).

P.S.3 And of course we can re-add the red parts from this patch except for the emtpy part https://github.com/O...c64d537c17bfb48 to let you set the userAgent "old fashioned...''


Edited by littlesat, 16 May 2016 - 22:27.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Crashing while pushing the menu button after using mediaportal #29 mirakels

  • Forum Moderator
    PLi® Core member
  • 7,604 posts

+62
Good

Posted 16 May 2016 - 22:22

@mirakels

I've already explained that not the mediaplayer itself is using this options, but E2 does. The also the last posting of littlesat, where PLi modified that code part in E2 sources.

I did not find any reference to mediaplayer configs in enigma2 except in de mediaplayer code itself.

 

The fact still remains that one plugin does not create a config section for another independent plugin. And I think it is not even needed in your case.


Geen wonder... Had slechts een dm7000, maar wel ook een rotor. eigenlijk al een tijdje ook een dm600 en dm7025. Maar nu kijkend met een et9000 en vuduo

Re: Crashing while pushing the menu button after using mediaportal #30 dhwz

  • Senior Member
  • 228 posts

+20
Neutral

Posted 16 May 2016 - 22:30

@littlesat

Thanks now we understand each other. I've never that that the old solution was good  ;)

 

@mirakels

We are not creating it for another plugin, but E2 itself demands this config options. Don't look at the current PLi code as these code parts have been removed. :)



Re: Crashing while pushing the menu button after using mediaportal #31 littlesat

  • PLi® Core member
  • 57,631 posts

+709
Excellent

Posted 16 May 2016 - 22:45

Thanks now we understand each other. I've never that that the old solution was good   ;)

->

Thanks for this comment.... But still I have a bit hope you consider to adjust it somehow.... Basically when the mediaplayer config about the UserAgent is not available you should add the user agent stuff somehow to the service reference... 

 

And silently I hope VTi can adopt to this and also consider to respect GPL....


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Crashing while pushing the menu button after using mediaportal #32 mirakels

  • Forum Moderator
    PLi® Core member
  • 7,604 posts

+62
Good

Posted 17 May 2016 - 06:58

Hi @dhwz,

I checked several (non-openpli) enigma repos and none seem to use mediaplayer configs outside the mediaplayer plugin itself. So I still do not understand your remark. And it still is strange: If a config item does not already exist it apparently is not used (whether it be in E2 or in  a plugin). So when you try to set it from within your plugin, who is going to use that setting then, as before you set it it was not used so after you set it it will still not be used?  Therefore I still see no reason to force its existence in the 'except' part.


Geen wonder... Had slechts een dm7000, maar wel ook een rotor. eigenlijk al een tijdje ook een dm600 en dm7025. Maar nu kijkend met een et9000 en vuduo

Re: Crashing while pushing the menu button after using mediaportal #33 dhwz

  • Senior Member
  • 228 posts

+20
Neutral

Posted 17 May 2016 - 08:22

@mirakels

You are trying to troll me right? I said this code is existent so please trust me. Also littlesat already proofed it. :P

And as you don't even understand what these config options do and how it is done, then please don't tell me how we have to handle them, because I know how it works. :D



Re: Crashing while pushing the menu button after using mediaportal #34 dhwz

  • Senior Member
  • 228 posts

+20
Neutral

Posted 17 May 2016 - 08:51

@littlesat

I've never said I'm a fan of these old solution, I have only a problem that after you removed the old code it broke compatibility for some (many) plugins which require these settings (would be better if you kept the old way just for backward compatibility).

I would also prefer your new solution, but I have no influence what DMM or VTi are implementing.

 

But at least I'll place a request @DMM, we'll see. :)


Edited by dhwz, 17 May 2016 - 08:51.


Re: Crashing while pushing the menu button after using mediaportal #35 mirakels

  • Forum Moderator
    PLi® Core member
  • 7,604 posts

+62
Good

Posted 17 May 2016 - 16:29

@mirakels

You are trying to troll me right? I said this code is existent so please trust me. Also littlesat already proofed it. :P

And as you don't even understand what these config options do and how it is done, then please don't tell me how we have to handle them, because I know how it works. :D

No, I'm not the one to troll. even if I disagree with someone. trolling woult be a waste of my time. I have better things to do than that...

 

If mediaplayer is installed the config.mediaplayer will be instantiated during engima2 startup. So it should just always exist then. But I guess one can even check if the config.mediaplayer is defined and only create a new one if it really does not exist. No you assume it does not exist because on of the subconfig items does not exist.

So the pseudcode should be something like

 

try  access config.mediaplayer

except config.mediaplayer = configsubsection()

try config.mediaplayer.alternateuseragent = 'bla'

except config.mediaplayer.alternatuseragen = configText('bla')

 

But see for yourself and maybe we can decide if at least we talek about the same thing. Looking for mediaplayer configs and alternateuseragent in the enigma code for openpli and openvix (openatv gives the same results,. Have no code for vti and dream):

openpli/git/enigma2 % grep --exclude po -ri config.mediaplayer .
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          defaultDir = config.MediaPlayer.defaultDir.getValue()
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          if config.MediaPlayer.alwaysHideInfoBar.value or self.ext not in AUDIO_EXTENSIONS and not self.isAudioCD:
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:                  if config.MediaPlayer.saveDirOnExit.getValue():
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:                          config.MediaPlayer.defaultDir.setValue(self.filelist.getCurrentDirectory())
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:                          config.MediaPlayer.defaultDir.save()
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          self.savePlaylistOnExit = config.MediaPlayer.savePlaylistOnExit.getValue()
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          if config.MediaPlayer.repeat.getValue() == True:
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          if config.MediaPlayer.sortPlaylists.value:
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          if config.MediaPlayer.sortPlaylists.value:
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          elif ( len(self.playlist) > 0 ) and ( config.MediaPlayer.repeat.getValue() == True ):
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:  if menuid == "mainmenu" and config.MediaPlayer.onMainMenu.getValue():
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.MediaPlayer = ConfigSubsection()
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.MediaPlayer.repeat = ConfigYesNo(default=False)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.MediaPlayer.savePlaylistOnExit = ConfigYesNo(default=True)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.MediaPlayer.saveDirOnExit = ConfigYesNo(default=False)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.MediaPlayer.defaultDir = ConfigDirectory()
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.MediaPlayer.sortPlaylists = ConfigYesNo(default=False)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.MediaPlayer.alwaysHideInfoBar = ConfigYesNo(default=True)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.MediaPlayer.onMainMenu = ConfigYesNo(default=False)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                config.MediaPlayer.saveDirOnExit.addNotifier(self.initConfigList)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("repeat playlist"), config.MediaPlayer.repeat))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("save playlist on exit"), config.MediaPlayer.savePlaylistOnExit))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("save last directory on exit"), config.MediaPlayer.saveDirOnExit))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        if not config.MediaPlayer.saveDirOnExit.getValue():
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                                self.list.append(getConfigListEntry(_("start directory"), config.MediaPlayer.defaultDir))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("sorting of playlists"), config.MediaPlayer.sortPlaylists))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("Always hide infobar"), config.MediaPlayer.alwaysHideInfoBar))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("show mediaplayer on mainmenu"), config.MediaPlayer.onMainMenu))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                if self["config"].getCurrent()[1] == config.MediaPlayer.defaultDir:
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        config.MediaPlayer.defaultDir.setValue(path)


openpli/git/enigma2 % grep --exclude po -ri alternateUserAgent .

openpli/git/enigma2 % 


openvix/enigma2 % grep --exclude po -ri config.mediaplayer .
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          defaultDir = config.mediaplayer.defaultDir.value
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          if config.mediaplayer.alwaysHideInfoBar.value or self.ext not in AUDIO_EXTENSIONS and not self.isAudioCD:
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:                  if config.mediaplayer.saveDirOnExit.value:
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:                          config.mediaplayer.defaultDir.setValue(self.filelist.getCurrentDirectory())
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:                          config.mediaplayer.defaultDir.save()
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          self.savePlaylistOnExit = config.mediaplayer.savePlaylistOnExit.value
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          if config.mediaplayer.repeat.value:
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          if config.mediaplayer.sortPlaylists.value:
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          if config.mediaplayer.sortPlaylists.value:
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:          elif ( len(self.playlist) > 0 ) and ( config.mediaplayer.repeat.value == True ):
./lib/python/Plugins/Extensions/MediaPlayer/plugin.py:  if menuid == "mainmenu" and config.mediaplayer.onMainMenu.value:
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.mediaplayer = ConfigSubsection()
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.mediaplayer.repeat = ConfigYesNo(default=False)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.mediaplayer.savePlaylistOnExit = ConfigYesNo(default=True)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.mediaplayer.saveDirOnExit = ConfigYesNo(default=False)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.mediaplayer.defaultDir = ConfigDirectory()
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.mediaplayer.sortPlaylists = ConfigYesNo(default=False)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.mediaplayer.alwaysHideInfoBar = ConfigYesNo(default=True)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:config.mediaplayer.onMainMenu = ConfigYesNo(default=False)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                config.mediaplayer.saveDirOnExit.addNotifier(self.initConfigList)
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("repeat playlist"), config.mediaplayer.repeat))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("save playlist on exit"), config.mediaplayer.savePlaylistOnExit))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("save last directory on exit"), config.mediaplayer.saveDirOnExit))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        if not config.mediaplayer.saveDirOnExit.value:
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                                self.list.append(getConfigListEntry(_("start directory"), config.mediaplayer.defaultDir))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("sorting of playlists"), config.mediaplayer.sortPlaylists))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("Always hide infobar"), config.mediaplayer.alwaysHideInfoBar))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        self.list.append(getConfigListEntry(_("show mediaplayer on mainmenu"), config.mediaplayer.onMainMenu))
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                if self["config"].getCurrent()[1] == config.mediaplayer.defaultDir:
./lib/python/Plugins/Extensions/MediaPlayer/settings.py:                        config.mediaplayer.defaultDir.setValue(path)


openvix/enigma2 % grep --exclude po -ri alternateUserAgent .

openvix/enigma2 % 

So no mediaplayer stuff outside the mediaplaer plugin, and no alternatuseragent anywhere. Now alternateuseragent may be found in vti and dream engima code.

But if it exist in there, your 'try config.mediaplayer.alterateuseragent.' would just work and you do not need the 'except'. But in openpli and openvix the 'try' would fail but that is no issue as the alternateuseragent is not in use (according to the above). So in both cases a 'except pass' would suffice I think.

 

Agai, I assume we are talking about the same thing. Otherwise ignore all my comments...  But if I'm wrong whaile we talk about the same thing I would be very interested in learning to know where my reasoning is flawed...


Geen wonder... Had slechts een dm7000, maar wel ook een rotor. eigenlijk al een tijdje ook een dm600 en dm7025. Maar nu kijkend met een et9000 en vuduo

Re: Crashing while pushing the menu button after using mediaportal #36 dhwz

  • Senior Member
  • 228 posts

+20
Neutral

Posted 17 May 2016 - 16:50

Really? And what is this?

 

http://code.vuplus.c...icemp3.cpp#l322

 

I've already explained that a pass is not working, we also get the exception on Dream and Vu+ if the mediaplayer is NOT installed. But E2 still uses this config options even if the mediaplayer is uninstalled. ;)

 

Sure I could change the code, but again this code is working properly for us. :) But maybe I'll change it, who knows. :P

And dont't blame us for removing the config options from E2, because we never had a problem till December when PLi removed it.


Edited by dhwz, 17 May 2016 - 16:54.


Re: Crashing while pushing the menu button after using mediaportal #37 littlesat

  • PLi® Core member
  • 57,631 posts

+709
Excellent

Posted 17 May 2016 - 17:24

It should not be a pass at all at this moment... What should be done is add the agent to the service reference that should be played in the proper format instead.... (Preferable)
-or-
We bring back some backwards compatebility (less wishfull)

I understand the ty except is required in case mediaplayer is not installed... Then the configsection should be defined and then this is the first time... When doing it this way you should define the configsubsection in usageconfig.py... And just add configs in media player... This all in the less wishfull solution...

For the preferable situation you need to have somehow an openpli/openatv/openvix etc detector... To handle this on the except is indeed not sufficiant...

I know understand fully how to solve this realy clean in a less wishfull but not clean way..

But which way should we go... The preferable or the less wished... ?

At least we could fix the itunersplayer stuff as these streams currently do not play as the agent is not correctly set on them....

Please note as I am gpl minded and promoter I still hope that you will consider to revise the license... ;)

Edited by littlesat, 17 May 2016 - 17:37.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Crashing while pushing the menu button after using mediaportal #38 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 17 May 2016 - 17:33

Really? And what is this?

 

http://code.vuplus.c...icemp3.cpp#l322

 

I've already explained that a pass is not working, we also get the exception on Dream and Vu+ if the mediaplayer is NOT installed. But E2 still uses this config options even if the mediaplayer is uninstalled. ;)

 

Sure I could change the code, but again this code is working properly for us. :) But maybe I'll change it, who knows. :P

And dont't blame us for removing the config options from E2, because we never had a problem till December when PLi removed it.

Sorry I followed a bit what you all said.

settings

I was never busy with this particular issue but you're plugin does overwrite a very very important setting. By lack off this settings even creates complete new settings (stored in to /etc/enigma2/settings)

 

That is wrong and really wrong. You should (must use) own settings for that. It is for You're plugin especially the http user-agent .. well thanks to mx3L we now can use so what all user agents possible. But we at all times in basic settings needs to keep the base e2 settings off it. Just adapt the plugin for you're personal plugin/media settings versus the media you targeted and you're problems are solved.

 

Note the day that only dream dictated how it is is gone. Adapt you're plugin to add #user-agent=<blabla bla>   before its is sended to servicemp3 by pli . and I'm shure this way off proceeding which in my opinion is very bright and well thaught by mx3L is very very good. Those days the diversion in media and ... there feeds  and .. is so diverse that a fixed setting is impossible.

 

Littlesat is very right whit his changes (which he only had to do cause external plugin makers did not give a shit about what they changed into configs)



Re: Crashing while pushing the menu button after using mediaportal #39 dhwz

  • Senior Member
  • 228 posts

+20
Neutral

Posted 17 May 2016 - 17:34

FYI, I've changed the code a bit, hope this helps.

	def setPlayerAgent(self):
		if not mp_globals.player_agent: return
		try:
			config.mediaplayer.useAlternateUserAgent.value = True
			config.mediaplayer.alternateUserAgent.value = mp_globals.player_agent
		except Exception, errormsg:
			if not hasattr(config, "mediaplayer"):
				config.mediaplayer = ConfigSubsection()
				config.mediaplayer.useAlternateUserAgent = ConfigYesNo(default=True)
				config.mediaplayer.alternateUserAgent = ConfigText(default=mp_globals.player_agent)
			else:
				pass
		self.onClose.append(self.clearPlayerAgent)

	def clearPlayerAgent(self):
		mp_globals.player_agent = None
		try:
			config.mediaplayer.useAlternateUserAgent.value = False
			config.mediaplayer.alternateUserAgent.value = ""
		except:
			pass

@christophecvr

You also don't understand how the old way did work? I can't store it somewhere else, it has to be in config.mediaplayer that is where E2 is looking for it.

And NO I'll not adapt it to your way. :P


Edited by dhwz, 17 May 2016 - 17:38.


Re: Crashing while pushing the menu button after using mediaportal #40 littlesat

  • PLi® Core member
  • 57,631 posts

+709
Excellent

Posted 17 May 2016 - 17:40

Thanks... But makes no sense at all... ;). It only avoids the gsod from your side,,,
It will stop gsod, but still the streams do not play...

It is or you adapt or we adapt (see post 37 for the details)

But when we adapt you can theoretically completely remove the try except structures on our plugin...

Edited by littlesat, 17 May 2016 - 17:44.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W



18 user(s) are reading this topic

0 members, 18 guests, 0 anonymous users