@@ -184,218 +184,240 @@ def fixMatch(self, searchResult=None, auto=False, agent=None):
184184class CollectionMixin (object ):
185185 """ Mixin for Plex objects that can have collections. """
186186
187- def addCollection (self , collections ):
187+ def addCollection (self , collections , locked = True ):
188188 """ Add a collection tag(s).
189189
190190 Parameters:
191191 collections (list): List of strings.
192+ locked (bool): True (default) to lock the field, False to unlock the field.
192193 """
193- self ._edit_tags ('collection' , collections )
194+ self ._edit_tags ('collection' , collections , locked = locked )
194195
195- def removeCollection (self , collections ):
196+ def removeCollection (self , collections , locked = True ):
196197 """ Remove a collection tag(s).
197198
198199 Parameters:
199200 collections (list): List of strings.
201+ locked (bool): True (default) to lock the field, False to unlock the field.
200202 """
201- self ._edit_tags ('collection' , collections , remove = True )
203+ self ._edit_tags ('collection' , collections , locked = locked , remove = True )
202204
203205
204206class CountryMixin (object ):
205207 """ Mixin for Plex objects that can have countries. """
206208
207- def addCountry (self , countries ):
209+ def addCountry (self , countries , locked = True ):
208210 """ Add a country tag(s).
209211
210212 Parameters:
211213 countries (list): List of strings.
214+ locked (bool): True (default) to lock the field, False to unlock the field.
212215 """
213- self ._edit_tags ('country' , countries )
216+ self ._edit_tags ('country' , countries , locked = locked )
214217
215- def removeCountry (self , countries ):
218+ def removeCountry (self , countries , locked = True ):
216219 """ Remove a country tag(s).
217220
218221 Parameters:
219222 countries (list): List of strings.
223+ locked (bool): True (default) to lock the field, False to unlock the field.
220224 """
221- self ._edit_tags ('country' , countries , remove = True )
225+ self ._edit_tags ('country' , countries , locked = locked , remove = True )
222226
223227
224228class DirectorMixin (object ):
225229 """ Mixin for Plex objects that can have directors. """
226230
227- def addDirector (self , directors ):
231+ def addDirector (self , directors , locked = True ):
228232 """ Add a director tag(s).
229233
230234 Parameters:
231235 directors (list): List of strings.
236+ locked (bool): True (default) to lock the field, False to unlock the field.
232237 """
233- self ._edit_tags ('director' , directors )
238+ self ._edit_tags ('director' , directors , locked = locked )
234239
235- def removeDirector (self , directors ):
240+ def removeDirector (self , directors , locked = True ):
236241 """ Remove a director tag(s).
237242
238243 Parameters:
239244 directors (list): List of strings.
245+ locked (bool): True (default) to lock the field, False to unlock the field.
240246 """
241- self ._edit_tags ('director' , directors , remove = True )
247+ self ._edit_tags ('director' , directors , locked = locked , remove = True )
242248
243249
244250class GenreMixin (object ):
245251 """ Mixin for Plex objects that can have genres. """
246252
247- def addGenre (self , genres ):
253+ def addGenre (self , genres , locked = True ):
248254 """ Add a genre tag(s).
249255
250256 Parameters:
251257 genres (list): List of strings.
258+ locked (bool): True (default) to lock the field, False to unlock the field.
252259 """
253- self ._edit_tags ('genre' , genres )
260+ self ._edit_tags ('genre' , genres , locked = locked )
254261
255- def removeGenre (self , genres ):
262+ def removeGenre (self , genres , locked = True ):
256263 """ Remove a genre tag(s).
257264
258265 Parameters:
259266 genres (list): List of strings.
267+ locked (bool): True (default) to lock the field, False to unlock the field.
260268 """
261- self ._edit_tags ('genre' , genres , remove = True )
269+ self ._edit_tags ('genre' , genres , locked = locked , remove = True )
262270
263271
264272class LabelMixin (object ):
265273 """ Mixin for Plex objects that can have labels. """
266274
267- def addLabel (self , labels ):
275+ def addLabel (self , labels , locked = True ):
268276 """ Add a label tag(s).
269277
270278 Parameters:
271279 labels (list): List of strings.
280+ locked (bool): True (default) to lock the field, False to unlock the field.
272281 """
273- self ._edit_tags ('label' , labels )
282+ self ._edit_tags ('label' , labels , locked = locked )
274283
275- def removeLabel (self , labels ):
284+ def removeLabel (self , labels , locked = True ):
276285 """ Remove a label tag(s).
277286
278287 Parameters:
279288 labels (list): List of strings.
289+ locked (bool): True (default) to lock the field, False to unlock the field.
280290 """
281- self ._edit_tags ('label' , labels , remove = True )
291+ self ._edit_tags ('label' , labels , locked = locked , remove = True )
282292
283293
284294class MoodMixin (object ):
285295 """ Mixin for Plex objects that can have moods. """
286296
287- def addMood (self , moods ):
297+ def addMood (self , moods , locked = True ):
288298 """ Add a mood tag(s).
289299
290300 Parameters:
291301 moods (list): List of strings.
302+ locked (bool): True (default) to lock the field, False to unlock the field.
292303 """
293- self ._edit_tags ('mood' , moods )
304+ self ._edit_tags ('mood' , moods , locked = locked )
294305
295- def removeMood (self , moods ):
306+ def removeMood (self , moods , locked = True ):
296307 """ Remove a mood tag(s).
297308
298309 Parameters:
299310 moods (list): List of strings.
311+ locked (bool): True (default) to lock the field, False to unlock the field.
300312 """
301- self ._edit_tags ('mood' , moods , remove = True )
313+ self ._edit_tags ('mood' , moods , locked = locked , remove = True )
302314
303315
304316class ProducerMixin (object ):
305317 """ Mixin for Plex objects that can have producers. """
306318
307- def addProducer (self , producers ):
319+ def addProducer (self , producers , locked = True ):
308320 """ Add a producer tag(s).
309321
310322 Parameters:
311323 producers (list): List of strings.
324+ locked (bool): True (default) to lock the field, False to unlock the field.
312325 """
313- self ._edit_tags ('producer' , producers )
326+ self ._edit_tags ('producer' , producers , locked = locked )
314327
315- def removeProducer (self , producers ):
328+ def removeProducer (self , producers , locked = True ):
316329 """ Remove a producer tag(s).
317330
318331 Parameters:
319332 producers (list): List of strings.
333+ locked (bool): True (default) to lock the field, False to unlock the field.
320334 """
321- self ._edit_tags ('producer' , producers , remove = True )
335+ self ._edit_tags ('producer' , producers , locked = locked , remove = True )
322336
323337
324338class SimilarArtistMixin (object ):
325339 """ Mixin for Plex objects that can have similar artists. """
326340
327- def addSimilarArtist (self , artists ):
341+ def addSimilarArtist (self , artists , locked = True ):
328342 """ Add a similar artist tag(s).
329343
330344 Parameters:
331345 artists (list): List of strings.
346+ locked (bool): True (default) to lock the field, False to unlock the field.
332347 """
333- self ._edit_tags ('similar' , artists )
348+ self ._edit_tags ('similar' , artists , locked = locked )
334349
335- def removeSimilarArtist (self , artists ):
350+ def removeSimilarArtist (self , artists , locked = True ):
336351 """ Remove a similar artist tag(s).
337352
338353 Parameters:
339354 artists (list): List of strings.
355+ locked (bool): True (default) to lock the field, False to unlock the field.
340356 """
341- self ._edit_tags ('similar' , artists , remove = True )
357+ self ._edit_tags ('similar' , artists , locked = locked , remove = True )
342358
343359
344360class StyleMixin (object ):
345361 """ Mixin for Plex objects that can have styles. """
346362
347- def addStyle (self , styles ):
363+ def addStyle (self , styles , locked = True ):
348364 """ Add a style tag(s).
349365
350366 Parameters:
351367 styles (list): List of strings.
368+ locked (bool): True (default) to lock the field, False to unlock the field.
352369 """
353- self ._edit_tags ('style' , styles )
370+ self ._edit_tags ('style' , styles , locked = locked )
354371
355- def removeStyle (self , styles ):
372+ def removeStyle (self , styles , locked = True ):
356373 """ Remove a style tag(s).
357374
358375 Parameters:
359376 styles (list): List of strings.
377+ locked (bool): True (default) to lock the field, False to unlock the field.
360378 """
361- self ._edit_tags ('style' , styles , remove = True )
379+ self ._edit_tags ('style' , styles , locked = locked , remove = True )
362380
363381
364382class TagMixin (object ):
365383 """ Mixin for Plex objects that can have tags. """
366384
367- def addTag (self , tags ):
385+ def addTag (self , tags , locked = True ):
368386 """ Add a tag(s).
369387
370388 Parameters:
371389 tags (list): List of strings.
390+ locked (bool): True (default) to lock the field, False to unlock the field.
372391 """
373- self ._edit_tags ('tag' , tags )
392+ self ._edit_tags ('tag' , tags , locked = locked )
374393
375- def removeTag (self , tags ):
394+ def removeTag (self , tags , locked = True ):
376395 """ Remove a tag(s).
377396
378397 Parameters:
379398 tags (list): List of strings.
399+ locked (bool): True (default) to lock the field, False to unlock the field.
380400 """
381- self ._edit_tags ('tag' , tags , remove = True )
401+ self ._edit_tags ('tag' , tags , locked = locked , remove = True )
382402
383403
384404class WriterMixin (object ):
385405 """ Mixin for Plex objects that can have writers. """
386406
387- def addWriter (self , writers ):
407+ def addWriter (self , writers , locked = True ):
388408 """ Add a writer tag(s).
389409
390410 Parameters:
391411 writers (list): List of strings.
412+ locked (bool): True (default) to lock the field, False to unlock the field.
392413 """
393- self ._edit_tags ('writer' , writers )
414+ self ._edit_tags ('writer' , writers , locked = locked )
394415
395- def removeWriter (self , writers ):
416+ def removeWriter (self , writers , locked = True ):
396417 """ Remove a writer tag(s).
397418
398419 Parameters:
399420 writers (list): List of strings.
421+ locked (bool): True (default) to lock the field, False to unlock the field.
400422 """
401- self ._edit_tags ('writer' , writers , remove = True )
423+ self ._edit_tags ('writer' , writers , locked = locked , remove = True )
0 commit comments