@@ -117,74 +117,74 @@ def checkExclusion(fullpath):
117
117
return True
118
118
119
119
# Live TV exclusion
120
- if ( fullpath .startswith ("pvr://" ) > - 1 ) and getSettingAsBool ('ExcludeLiveTV' ):
120
+ if fullpath .startswith ("pvr://" ) and getSettingAsBool ('ExcludeLiveTV' ):
121
121
logger .debug ("checkExclusion(): Video is playing via Live TV, which is currently set as excluded location." )
122
122
return True
123
123
124
124
# HTTP exclusion
125
- if (fullpath .startswith ("http://" ) > - 1 ) and getSettingAsBool ('ExcludeHTTP' ):
125
+ if (fullpath .startswith ("http://" ) or fullpath . startswith ( "https://" ) ) and getSettingAsBool ('ExcludeHTTP' ):
126
126
logger .debug ("checkExclusion(): Video is playing via HTTP source, which is currently set as excluded location." )
127
127
return True
128
128
129
129
# Path exclusions
130
130
ExcludePath = getSetting ('ExcludePath' )
131
131
if ExcludePath != "" and getSettingAsBool ('ExcludePathOption' ):
132
- if fullpath .startswith (ExcludePath ) > - 1 :
132
+ if fullpath .startswith (ExcludePath ):
133
133
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 1." )
134
134
return True
135
135
ExcludePath2 = getSetting ('ExcludePath2' )
136
136
if ExcludePath2 != "" and getSettingAsBool ('ExcludePathOption2' ):
137
- if fullpath .startswith (ExcludePath2 ) > - 1 :
137
+ if fullpath .startswith (ExcludePath2 ):
138
138
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 2." )
139
139
return True
140
140
ExcludePath3 = getSetting ('ExcludePath3' )
141
141
if ExcludePath3 != "" and getSettingAsBool ('ExcludePathOption3' ):
142
- if fullpath .startswith (ExcludePath3 ) > - 1 :
142
+ if fullpath .startswith (ExcludePath3 ):
143
143
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 3." )
144
144
return True
145
145
ExcludePath4 = getSetting ('ExcludePath4' )
146
146
if ExcludePath4 != "" and getSettingAsBool ('ExcludePathOption4' ):
147
- if fullpath .startswith (ExcludePath4 ) > - 1 :
147
+ if fullpath .startswith (ExcludePath4 ):
148
148
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 4." )
149
149
return True
150
150
ExcludePath5 = getSetting ('ExcludePath5' )
151
151
if ExcludePath5 != "" and getSettingAsBool ('ExcludePathOption5' ):
152
- if fullpath .startswith (ExcludePath5 ) > - 1 :
152
+ if fullpath .startswith (ExcludePath5 ):
153
153
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 5." )
154
154
return True
155
155
ExcludePath6 = getSetting ('ExcludePath6' )
156
156
if ExcludePath6 != "" and getSettingAsBool ('ExcludePathOption6' ):
157
- if fullpath .startswith (ExcludePath6 ) > - 1 :
157
+ if fullpath .startswith (ExcludePath6 ):
158
158
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 6." )
159
159
return True
160
160
ExcludePath7 = getSetting ('ExcludePath7' )
161
161
if ExcludePath7 != "" and getSettingAsBool ('ExcludePathOption7' ):
162
- if fullpath .startswith (ExcludePath7 ) > - 1 :
162
+ if fullpath .startswith (ExcludePath7 ):
163
163
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 7." )
164
164
return True
165
165
ExcludePath8 = getSetting ('ExcludePath8' )
166
166
if ExcludePath8 != "" and getSettingAsBool ('ExcludePathOption8' ):
167
- if fullpath .startswith (ExcludePath8 ) > - 1 :
167
+ if fullpath .startswith (ExcludePath8 ):
168
168
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 8." )
169
169
return True
170
170
ExcludePath9 = getSetting ('ExcludePath9' )
171
171
if ExcludePath9 != "" and getSettingAsBool ('ExcludePathOption9' ):
172
- if fullpath .startswith (ExcludePath9 ) > - 1 :
172
+ if fullpath .startswith (ExcludePath9 ):
173
173
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 9." )
174
174
return True
175
175
ExcludePath10 = getSetting ('ExcludePath10' )
176
176
if ExcludePath10 != "" and getSettingAsBool ('ExcludePathOption10' ):
177
- if fullpath .startswith (ExcludePath10 ) > - 1 :
177
+ if fullpath .startswith (ExcludePath10 ):
178
178
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 10." )
179
179
return True
180
180
ExcludePath11 = getSetting ('ExcludePath11' )
181
181
if ExcludePath11 != "" and getSettingAsBool ('ExcludePathOption11' ):
182
- if fullpath .startswith (ExcludePath11 ) > - 1 :
182
+ if fullpath .startswith (ExcludePath11 ):
183
183
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 11." )
184
184
return True
185
185
ExcludePath12 = getSetting ('ExcludePath12' )
186
186
if ExcludePath12 != "" and getSettingAsBool ('ExcludePathOption12' ):
187
- if fullpath .startswith (ExcludePath12 ) > - 1 :
187
+ if fullpath .startswith (ExcludePath12 ):
188
188
logger .debug ("checkExclusion(): Video is from location, which is currently set as excluded path 12." )
189
189
return True
190
190
0 commit comments