Changeset 16119


Ignore:
Timestamp:
May 28, 2012, 8:05:40 PM (14 years ago)
Author:
obi
Message:

fix

Location:
ipk/source.sh4/swapplayers_mediacenter_1.0/var/swap/extensions/MediaCenter
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/swapplayers_mediacenter_1.0/var/swap/extensions/MediaCenter/MC_FileListCover.py

    r16112 r16119  
    3636from Components.Console import Console
    3737from Screens.InfoBarGenerics import InfoBarSeek, InfoBarAudioSelection, InfoBarCueSheetSupport, InfoBarNotifications, \
    38         InfoBarShowHide, InfoBarServiceErrorPopupSupport, InfoBarSecondInfobar, \
    39         InfoBarPVRState, InfoBarSimpleEventView, InfoBarServiceNotifications, InfoBarResolutionSelection, \
     38        InfoBarShowHide, InfoBarServiceErrorPopupSupport, \
     39        InfoBarPVRState, InfoBarSimpleEventView, InfoBarServiceNotifications, \
    4040        InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, InfoBarTeletextPlugin
    4141import os
  • ipk/source.sh4/swapplayers_mediacenter_1.0/var/swap/extensions/MediaCenter/MC_PictureViewer.py

    r16112 r16119  
    44from Screens.ServiceInfo import ServiceInfoList, ServiceInfoListEntry
    55from Screens.InfoBarGenerics import InfoBarSeek, InfoBarAudioSelection, InfoBarCueSheetSupport, InfoBarNotifications, \
    6         InfoBarShowHide, InfoBarServiceErrorPopupSupport, InfoBarSecondInfobar, \
    7         InfoBarPVRState, InfoBarSimpleEventView, InfoBarServiceNotifications, InfoBarResolutionSelection, \
     6        InfoBarShowHide, InfoBarServiceErrorPopupSupport, \
     7        InfoBarPVRState, InfoBarSimpleEventView, InfoBarServiceNotifications, \
    88        InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, InfoBarTeletextPlugin
     9
    910from Components.AVSwitch import AVSwitch
    1011from Components.ActionMap import ActionMap, NumberActionMap, HelpableActionMap
     
    3839from Plugins.Extensions.Aafpanel.plugin import command
    3940from __init__ import _
     41
     42print "hallllllllllllllllllllllllllllllllllllllllllllllllo"
     43checkpli = False
     44if os.path.isfile("/etc/.enigma2-pli") is True:
     45        checkpli = True
     46
     47try:
     48        from Screens.InfoBarGenerics import InfoBarSecondInfobar, InfoBarResolutionSelection
     49except:
     50        pass
    4051
    4152lastpath = "/"
     
    14251436                self.close()
    14261437
    1427 class MC_PicView(Screen, InfoBarAspectSelection, InfoBarResolutionSelection):
     1438
     1439if checkpli is True:
     1440        input = Screen, InfoBarAspectSelection
     1441else:
     1442        input = Screen, InfoBarAspectSelection, InfoBarResolutionSelection
     1443
     1444class MC_PicView(input):
    14281445        def __init__(self, session, filelist, pindex, path, startslide):
    14291446                self.debug = command('cat /var/etc/autostart/start-config | grep debug | cut -d = -f2')
  • ipk/source.sh4/swapplayers_mediacenter_1.0/var/swap/extensions/MediaCenter/MC_VideoPlayer.py

    r16112 r16119  
    2424from Screens.HelpMenu import HelpableScreen
    2525from Screens.InfoBarGenerics import InfoBarSeek, InfoBarAudioSelection, InfoBarCueSheetSupport, InfoBarNotifications, \
    26         InfoBarShowHide, InfoBarServiceErrorPopupSupport, InfoBarSecondInfobar, \
    27         InfoBarPVRState, InfoBarSimpleEventView, InfoBarServiceNotifications, InfoBarResolutionSelection, \
     26        InfoBarShowHide, InfoBarServiceErrorPopupSupport, \
     27        InfoBarPVRState, InfoBarSimpleEventView, InfoBarServiceNotifications, \
    2828        InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, InfoBarTeletextPlugin
     29
    2930from Screens.Screen import Screen
    3031from Screens.ServiceInfo import ServiceInfoList, ServiceInfoListEntry
     
    4647
    4748from Components.Harddisk import harddiskmanager
     49
     50checkpli = False
     51if os.path.isfile("/etc/.enigma2-pli") is True:
     52        checkpli = True
     53
     54try:
     55        from Screens.InfoBarGenerics import InfoBarSecondInfobar, InfoBarResolutionSelection
     56except:
     57        pass
    4858
    4959T_INDEX = 0
     
    27552765                self.session.open(NetworkAdapterSelection)
    27562766
    2757 class MoviePlayerObi(InfoBarShowHide, \
    2758                 InfoBarSeek, InfoBarAudioSelection, HelpableScreen, InfoBarNotifications, InfoBarAspectSelection, InfoBarSecondInfobar,
    2759                 InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, InfoBarResolutionSelection,
    2760                 InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, Screen, InfoBarTeletextPlugin,
    2761                 InfoBarServiceErrorPopupSupport):
     2767if checkpli is True:
     2768        input = (InfoBarShowHide, InfoBarSeek, InfoBarAudioSelection, HelpableScreen, InfoBarNotifications, InfoBarAspectSelection, InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, Screen, InfoBarTeletextPlugin, InfoBarServiceErrorPopupSupport)
     2769else:
     2770        input = (InfoBarShowHide, InfoBarSeek, InfoBarAudioSelection, HelpableScreen, InfoBarNotifications, InfoBarAspectSelection, InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, Screen, InfoBarTeletextPlugin, InfoBarServiceErrorPopupSupport, InfoBarResolutionSelection, InfoBarSecondInfobar)
     2771
     2772class MoviePlayerObi(input):
    27622773        ENABLE_RESUME_SUPPORT = True
    27632774        ALLOW_SUSPEND = True
    2764 
     2775       
    27652776        def __init__(self, session, service, showFileInfo, playlist):
    27662777                Screen.__init__(self, session)
     
    27682779                InfoBarAspectSelection.__init__(self)
    27692780                InfoBarAudioSelection.__init__(self)
    2770                 InfoBarSecondInfobar.__init__(self)
     2781                if checkpli is True:
     2782                        InfoBarSecondInfobar.__init__(self)
     2783               
    27712784                InfoBarSeek.__init__(self, actionmap = "MediaCenterSeekActions")
    27722785                self.debug = command('cat /var/etc/autostart/start-config | grep debug | cut -d = -f2')
    2773 
     2786       
    27742787                config.plugins.mc_playing.Enabled = ConfigYesNo(default=True)
    2775 
     2788       
    27762789                self["actions"] = HelpableActionMap(self, "MoviePlayerActions",
    27772790                        {
    27782791                                "leavePlayer": (self.leavePlayer, _("leave movie player..."))
    27792792                        })
    2780 
     2793       
    27812794                self["MediaPlayerActions"] = HelpableActionMap(self, "MediaPlayerActions",
    27822795                        {
     
    27982811                                "ok": (self.change_ratio, "Change Ratio old"),
    27992812                        }, -2)
    2800 
     2813       
    28012814                for x in HelpableScreen, InfoBarShowHide, \
    28022815                                InfoBarSeek, \
     
    28102823                self.returning = False
    28112824                self.playlist = playlist
    2812 
     2825       
    28132826        def showPlaylist(self):
    28142827                if self.debug != "off":
    28152828                        print "[MC_VideoPlayer] showPlaylist playlist leng (%s)" % (len(self.playlist))
    2816 
     2829       
    28172830                print "[MC_VideoPlayer] showPlaylist playlist leng (%s)" % (len(self.playlist))
    2818 
     2831       
    28192832                if len(self.playlist) > 1:
    28202833                        if len(self.playlist.getServiceRefList()) and len(self.playlist) > 1 and self.seekstate[3] == '>':
     
    28452858                else:
    28462859                        self.setSeekState(self.SEEK_STATE_PLAY)
    2847 
     2860       
    28482861                        if self.debug != "off":
    28492862                                print "[MC_VideoPlayer] showPlaylist  skipped singel play"
    2850 
    2851 
     2863       
     2864       
    28522865        def nextMarkOrEntry(self):
    28532866                if self.debug != "off":
     
    28652878                        if self.debug != "off":
    28662879                                print "[MC_VideoPlayer] nextMarkOrEntry  skipped singel play"
    2867 
     2880       
    28682881        def previousMarkOrEntry(self):
    28692882                if self.debug != "off":
     
    28812894                        if self.debug != "off":
    28822895                                print "[MC_VideoPlayer] previousMarkOrEntry  skipped singel play"
    2883 
     2896       
    28842897        def leavePlayer(self):
    28852898                self.is_closing = True
     
    29012914                                config.av.threedmode.save()
    29022915                        self.session.nav.stopService()
    2903 
     2916       
    29042917                        if self.playlist != []:
    29052918                                self.playlist.clear()
    2906 
     2919       
    29072920                        evfd.getInstance().vfd_write_string("MEDIACENTER")
    29082921                        os.system("vfdctl -play")
     
    29112924                elif answer == "restart":
    29122925                        self.doSeek(0)
    2913 
     2926       
    29142927        def doEofInternal(self, playing):
    29152928                if self.debug != "off":
     
    29192932                                print "[MC_VideoPlayer] set autoSleep %s min" % (config.plugins.mc_vp_autoSleep.delay.getValue())
    29202933                        self.session.nav.SleepTimer.setSleepTime(config.plugins.mc_vp_autoSleep.delay.getValue())
    2921 #               else:                                                                                                                   ### FIX ME ! Dimmer.Timer gives a GS here (not an attribute) !#######
    2922 #                       self.DimmerTimer.start(config.plugins.mc_all.dimmer_delay.getValue() * 1000, True)
    2923 
     2934        #               else:                                                                                                                   ### FIX ME ! Dimmer.Timer gives a GS here (not an attribute) !#######
     2935        #                       self.DimmerTimer.start(config.plugins.mc_all.dimmer_delay.getValue() * 1000, True)
     2936       
    29242937                print "len(self.playlist)", len(self.playlist)
    2925 
     2938       
    29262939                if ( len(self.playlist) > 0 ):
    29272940                        print "[MC_VideoPlayer] stop playlist"
     
    29312944                                        print "[MC_VideoPlayer] stop autoSleep %s min" % (config.plugins.mc_vp_autoSleep.delay.getValue())
    29322945                                self.session.nav.SleepTimer.clear()
    2933 
     2946       
    29342947                self.session.nav.playService(None)
    2935 
     2948       
    29362949                self.is_closing = True
    29372950                evfd.getInstance().vfd_write_string("MEDIACENTER")
     
    29392952               
    29402953                self.close(1)
    2941 
     2954       
    29422955        def subtitleSelection(self):
    29432956                if self.debug != "off":
     
    29452958                from Screens.AudioSelection import SubtitleSelection
    29462959                self.session.open(SubtitleSelection, self)
    2947 
     2960       
    29482961        def audioSelection(self):
    29492962                if self.debug != "off":
     
    29512964                from Screens.AudioSelection import AudioSelection
    29522965                self.session.openWithCallback(self.audioSelected, AudioSelection, infobar=self)         
    2953 
     2966       
    29542967        def videoSelection(self):
    29552968                if self.debug != "off":
    29562969                        print "[MC_VideoPlayer] start videoSelection"
    2957 #               from Screens.InfoBarGenerics import InfoBarAudioSelection
    2958 #               from Screens.AudioSelection import AudioSelection
    2959 
    2960                
    2961 #               self.session.open(InfoBarAudioSelection.aspectSelection)       
    2962 
    2963 #               from Screens.AudioSelection import AudioSelection
    2964 #               self.session.openWithCallback(self.aspectSelection, AudioSelection)             
     2970        #               from Screens.InfoBarGenerics import InfoBarAudioSelection
     2971        #               from Screens.AudioSelection import AudioSelection
     2972       
     2973               
     2974        #               self.session.open(InfoBarAudioSelection.aspectSelection)       
     2975       
     2976        #               from Screens.AudioSelection import AudioSelection
     2977        #               self.session.openWithCallback(self.aspectSelection, AudioSelection)             
    29652978               
    29662979                from Screens.InfoBarGenerics import InfoBarAudioSelection
    2967 #               self.aspectSelection = aspectSelection
     2980        #               self.aspectSelection = aspectSelection
    29682981                self.session.open(self.aspectSelection)
    2969 #               self.session.open(aspectSelection)             
    2970 
     2982        #               self.session.open(aspectSelection)             
     2983       
    29712984        def sleepTimer(self):
    29722985                from Screens.SleepTimerEdit import SleepTimerEdit
    29732986                self.session.open(SleepTimerEdit)
    2974 
     2987       
    29752988        def videoTune(self):
    29762989                if os_path.isfile("/usr/lib/enigma2/python/Plugins/Extensions/Aafpanel/plugin.pyc") is True:
     
    29802993                        except:
    29812994                                pass
    2982 
     2995       
    29832996        def change_ratio(self):
    29842997                if self.debug != "off":
     
    30183031                        eAVSwitch.getInstance().setAspectRatio(2)
    30193032                        self.session.open(MC_MessageBox, 'BESTFIT', MC_MessageBox.TYPE_WARNING, timeout=2)
     3033               
Note: See TracChangeset for help on using the changeset viewer.