Jump to content


Photo

Media player exit protection not able to set


  • Please log in to reply
12 replies to this topic

#1 janeCMD

  • Member
  • 9 posts

0
Neutral

Posted 25 March 2014 - 22:43

Hello,

 

I have very annoying problem with media player in newest openPLI : The Media player has exit protection (in Image i used before, it didnt have this feature), when i click exit, it will ask if i want to exit. I was not able to find setting in menu, where to disable this protection. It annoys me, because it makes it hard to exit  media player and put box to sleep without TV being on (I use box as music player).

 

And the main, most annoying problem: I have Android App called 'Dream Music Manager', which controls media player from phone (no need to start TV to play music). This App seems to rely on exit function behaving the old way. If there is 'Exit protection' in media player, it will not succesfully exit it, but succesfully put box into standby. Next time i start some music, new instance of Media player is started. If i do this on and off multiple times, then there are multiple instances of media player running, each of them in state of asking, if i wish to exit. Then, once i start TV, and want to watch satelite channels, i need to click like 10 times on 'Yes' to exit all media player instances. Sometimes during this exit, i will get 'green death', when box needs to restart.

 

Can you please advice me, if this is possible to disable somehow, and (OR), if its planned to add setting to disable this 'exit protection' feature.

 

Thank you,

Peter


Edited by janeCMD, 25 March 2014 - 22:45.


Re: Media player exit protection not able to set #2 tomek

  • Senior Member
  • 65 posts

+3
Neutral

Posted 25 March 2014 - 22:52

4097_0_1_0_0_0_0_0_0_0.jpg



Re: Media player exit protection not able to set #3 WanWizard

  • PLi® Core member
  • 70,497 posts

+1,810
Excellent

Posted 25 March 2014 - 22:52

What do you exactly mean by "media player"?

 

In an OpenPLi image, you play (any) media using the PVR button. We don't make a distinction between a recording an any other media file you can play. It is not advised to use external players...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Media player exit protection not able to set #4 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 26 March 2014 - 09:27

the issue you refer to drove me mad !!

 

i had to edit the Infobar.py file to stop this nag by commenting out the MessageBox

 

    def leavePlayerOnExit(self):
        if self.shown:
            self.hide()
        else:
            #self.session.openWithCallback(self.leavePlayerOnExitCallback, MessageBox, _('Exit movie player?'), simple = True)
            setResumePoint(self.session)
            self.handleLeave('quit')  

 

although i do believe from reading the Infobar code on the Github that recently an option has been added in the menus to exit without popup,so i will remove my edited py file file now and try the new one from the Github to see if it now can be set in the menus, to exit without this annoying nag.

 

Ian.  


Edited by ian1095, 26 March 2014 - 09:29.


Re: Media player exit protection not able to set #5 Sjaaky

  • Senior Member
  • 7,443 posts

+41
Good

Posted 26 March 2014 - 09:38

What do you exactly mean by "media player"?

 

In an OpenPLi image, you play (any) media using the PVR button. We don't make a distinction between a recording an any other media file you can play. It is not advised to use external players...

 

Just the media player referred to as 'media player'. It is not an external plugin, but part of the standard enigma2 plugin collection.



Re: Media player exit protection not able to set #6 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 26 March 2014 - 09:39

yes it seems to work,although further full testing is needed under all circustances to see if this annoying message has now truely been disabled completely.strangely the setting to disable is is in the record section and this is probably why you could not find it.

 

Menu/Setup/System/Record

 

Allow Quit  Movieplayer With Exit = Without popup

 

Ian.



Re: Media player exit protection not able to set #7 littlesat

  • PLi® Core member
  • 57,159 posts

+698
Excellent

Posted 26 March 2014 - 09:42

So it isn't an issue,,, the only issue was that you could not find the options?

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


Re: Media player exit protection not able to set #8 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 26 March 2014 - 09:56

nope it now seems to be fixed Littlesat,but at the time i edited the Infobar.py file this option had not been added,so it seems that recently, one of the devs,perhaps yourself ? has noticed this issue and fixed it by adding the option to disable the annoying popup.

 

Ian.



Re: Media player exit protection not able to set #9 janeCMD

  • Member
  • 9 posts

0
Neutral

Posted 26 March 2014 - 11:39

Yes, its true i didnt find this option in menu, because i was mainly looking in media player menu. I didnt think it would be in system menu.

 

Anyway, i have enabled the option 'without popup' and there is no change in behavior, it asks if i want to exit anyway, like the option is being ignored. I tryed to restart the box without success.

 

I guess i am going to try editing mentioned Infobar.py file, i will write later if that works.

 

Thank you a lot for insightful replies.



Re: Media player exit protection not able to set #10 janeCMD

  • Member
  • 9 posts

0
Neutral

Posted 26 March 2014 - 11:51

OK so, after initial tryes, i am kind of confused, how to do this modification in mentioned py file. I found only pyo file with such name.

 

Should i decompile that file, modify, then compile back into pyo and replace ?



Re: Media player exit protection not able to set #11 janeCMD

  • Member
  • 9 posts

0
Neutral

Posted 26 March 2014 - 13:49

I have finally resolved it - After checking decompiled Infobar.pyo file all looked OK there, and any setting in 'Allow Quit  Movieplayer With Exit' was ignored.

 

The problem was in MediaPlayer/plugin.py file, where the question upon exit was hardcoded, ignoring any settings.

 

The file in question: /usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer/plugin.py

 

Function: def exit(self) - I have replaced else: section with content of  'exitCallback(self, answer)'

def exit(self):
		if self.mediaPlayerInfoBar.shown:
			self.timerHideMediaPlayerInfoBar()
		else:
			self.playlistIOInternal.clear()
			for x in self.playlist.list:
				self.playlistIOInternal.addService(ServiceReference(x[0]))
			if self.savePlaylistOnExit:
				try:
					self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls"))
				except IOError:
					print "couldn't save playlist.e2pls"
			if config.mediaplayer.saveDirOnExit.getValue():
				config.mediaplayer.defaultDir.setValue(self.filelist.getCurrentDirectory())
				config.mediaplayer.defaultDir.save()
			try:
				from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
				hotplugNotifier.remove(self.hotplugCB)
			except:
				pass
			del self["coverArt"].picload
			self.close()

Maybe its possible to call the callback function directly: exitCallback(self, true) to save the lines of code, but i am not python expert, so i don't know.

 

So my problem is resolved now, i guess this issue should be fixed, to take configuration into account in exit procedure.


Edited by janeCMD, 26 March 2014 - 13:50.


Re: Media player exit protection not able to set #12 littlesat

  • PLi® Core member
  • 57,159 posts

+698
Excellent

Posted 26 March 2014 - 14:45

Why did you decompile infobar.py if you simply van install it with
opkg install enigma2-src
?

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


Re: Media player exit protection not able to set #13 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 26 March 2014 - 18:01

Or you can download it here:

http://sourceforge.n...python/Screens/


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04


3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users