Skip to content

Commit

Permalink
Background colour property change (#111)
Browse files Browse the repository at this point in the history
Background colour property change
  • Loading branch information
dfaker committed Jun 17, 2024
1 parent 5be483f commit 2e1b46d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
15 changes: 12 additions & 3 deletions src/cutselectionController.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ def initialisePlayer(self):
loop='inf',
mute=True,
volume=0,
background=self.globalOptions.get('cutsTabPlayerBackgroundColour','#282828'),
autofit_larger='1280',
autoload_files='no',
cover_art_auto='no',
Expand All @@ -315,6 +314,16 @@ def initialisePlayer(self):
if self.globalOptions.get('disableSubtitlesInPlayers',True):
self.player.subtitles=False

try:
self.player.background=self.globalOptions.get('cutsTabPlayerBackgroundColour','#282828')
except:
pass

try:
self.player.background_color=self.globalOptions.get('cutsTabPlayerBackgroundColour','#282828')
except:
pass

self.player.observe_property('time-pos', self.handleMpvTimePosChange)
self.player.observe_property('duration', self.handleMpvDurationChange)
self.player.observe_property('pause', self.playbackStatusChanged)
Expand Down Expand Up @@ -542,8 +551,8 @@ def loadVideoYTdlFromClipboard(self,url):

self.ytdlService.loadUrl(url,0,username,password,False,browserCookies,'default',code2factor,self.returnYTDLDownlaodedVideo)

def loadVideoYTdl(self,url,fileLimit,username,password,useCookies,browserCookies,qualitySort,code2Factor):
self.ytdlService.loadUrl(url,fileLimit,username,password,useCookies,browserCookies,qualitySort,code2Factor,self.returnYTDLDownlaodedVideo)
def loadVideoYTdl(self,url,fileLimit,username,password,useCookies,browserCookies,qualitySort,code2Factor,retrycount=0):
self.ytdlService.loadUrl(url,fileLimit,username,password,useCookies,browserCookies,qualitySort,code2Factor,self.returnYTDLDownlaodedVideo,retrycount=0)

def returnImageLoadAsVideo(self,filename):
self.loadFiles([os.path.abspath(filename)])
Expand Down
13 changes: 12 additions & 1 deletion src/filterSelectionController.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,25 @@ def __init__(self,controller,ui,videoManager,ffmpegService,faceDetectService,glo
loglevel='info',
loop='inf',
mute=True,
background=globalOptions.get('filtersTabPlayerBackgroundColour','#282828'),
cursor_autohide="always",
autofit_larger='1280',
autoload_files='no',
cover_art_auto='no',
audio_file_auto='no',
sub_auto='no')


try:
self.player.background=self.globalOptions.get('filtersTabPlayerBackgroundColour','#282828')
except:
pass

try:
self.player.background_color=self.globalOptions.get('filtersTabPlayerBackgroundColour','#282828')
except:
pass


if self.globalOptions.get('disableSubtitlesInPlayers',True):
self.player.subtitles=False

Expand Down

0 comments on commit 2e1b46d

Please sign in to comment.