-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathpseudo_config.py
111 lines (79 loc) · 3.51 KB
/
pseudo_config.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/env python
"""
1) Create a file outside of this proj dir called "plex_token.py":
touch ../plex_token.py
2) add these lines to the newly created file:
baseurl = 'the url to your server'
token = 'your plex token'
3) Edit the "basurl" variable below to point to your Plex server
4) Edit the "plexClients" variable to include the name of your plex client(s) this app will control.
5) Edit the "plexLibraries" variable to remap your specific library names to the app specific names.
...for instance, if your Plex "Movies" are located in your Plex library as "Films", update that
line so it looks like:
"Movies" : ["Films"],
6) *Skip this feature for now*
For Google Calendar integration add your "gkey" to the "plex_token.py" file
...(https://docs.simplecalendar.io/find-google-calendar-id/):
gkey = "the key"
7) If using the Google Calendar integration exclusively, set this to true below:
useGoogleCalendar
"""
'''
*
* List of plex clients to use (add multiple clients to control multiple TV's)
*
Passing string with the client name or dict with the client base url :
plexClients = [{'baseurl': 'http://rasplex.local:3005'}]
'''
plexClients = ['RasPlex']
plexLibraries = {
"TV Shows" : ["TV"],
"Movies" : ["Films"],
"Commercials" : ["Commercials", "Smashing Pumpkins - Videos"],
}
useCommercialInjection = True
"""How many seconds to pad commercials between each other / other media"""
commercialPadding = 5
"""
Specify the path to this controller on the network (i.e. 'http://192.168.1.28' - no trailing slash).
Also specify the desired port to run the simple http webserver. The daily generated
schedule will be served at "http://<your-ip>:<your-port>/" (i.e. "http://192.168.1.28:8000/").
You can also leave the below controllerServerPath empty if you'd like to run your own webserver.
"""
controllerServerPath = "http://192.168.1.28"
controllerServerPort = "8000"
"""
This variable sets the title for the PseudoChannel.py html page.
"""
htmlPseudoTitle = "Daily PseudoChannel"
"""
When the schedule updates every 24 hours, it's possible that it will interrupt any shows / movies that were
playing from the previous day. To fix this, the app saves a "cached" schedule from the previous day to
override any media that is trying to play while the previous day is finishing.
"""
useDailyOverlapCache = False
dailyUpdateTime = "12:01 AM"
"""When to delete / remake the pseudo-channel.log - right at midnight, (i.e. 'friday') """
rotateLog = "friday"
"""Debug mode will give you more output in your terminal to help problem solve issues."""
debug_mode = True
"""This squeezes in one last commercial to fill up the empty gaps even if the last commercial gets cutoff
Set this to false if you don't want your commercials to get cutoff/don't mind the gap.
"""
useDirtyGapFix = False
"""
##### Do not edit below this line---------------------------------------------------------------
Below is logic to grab your Plex 'token' & Plex 'baseurl'. If you are following along and have created a 'plex_token.py'
file as instructed, you do not need to edit below this line.
"""
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# import ../plex_token.py
try:
import plex_token as plex_token
except ImportError as e:
print "+++++ Cannot find plex_token file. Make sure you create a plex_token.py file with the appropriate data."
raise e
baseurl = plex_token.baseurl
token = plex_token.token
gkey = '' #plex_token.gkey