forked from plexinc/PlexConnect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.py
71 lines (55 loc) · 1.91 KB
/
Settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/python
from Debug import * # dprint()
"""
Global Settings...
"""
settingsMovieView = 'Movie_Grid.xml'
settingsShowView = 'Show_List.xml'
settingsSeasonView = 'Season_List.xml'
settingsForceDirectPlay = False
settingsForceTranscode = False
#
# Plex Media Server
def getPlexGDM():
return True # True: use PlexGDM (GoodDayMate) to auto discover PMS
def getIP_PMS(): # default IP, if GDM fails... todo: do we need this fall back?
return '192.168.178.2'
def getPort_PMS():
return 32400
#
# DNS/WebServer
def getIP_DNSmaster(): # Router, ISP's DNS, ...
return '8.8.8.8' # google public DNS
def getHostToIntercept():
return 'trailers.apple.com'
#
# AppleTV
def getForceDirectPlay(): # if true, this has higher priority than transcoding
return settingsForceDirectPlay
def getForceTranscoding():
return settingsForceTranscode
def getMovieViewType():
return settingsMovieView
def getShowViewType():
return settingsShowView
def getSeasonViewType():
return settingsSeasonView
def updateSettings(setting):
global settingsMovieView
global settingsShowView
global settingsSeasonView
global settingsForceDirectPlay
global settingsForceTranscode
parts = setting.split(':')
for i in range(0, len(parts)):
if parts[i] == 'MovieView':
if parts[i+1] == 'Grid': settingsMovieView = 'Movie_Grid.xml'
if parts[i+1] == 'List': settingsMovieView = 'Movie_List.xml'
if parts[i] == 'ShowView':
if parts[i+1] == 'Grid': settingsShowView = 'Show_Grid.xml'
if parts[i+1] == 'List': settingsShowView = 'Show_List.xml'
if parts[i+1] == 'Bookcase': settingsShowView = 'Show_Bookcase.xml'
if parts[i] == 'SeasonView':
if parts[i+1] == 'List': settingsSeasonView = 'Season_List.xml'
if parts[i+1] == 'Coverflow': settingsSeasonView = 'Season_Coverflow.xml'
return