Conditions | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 4.048 |
1 | 1 | from plugin.sync.core.enums import SyncData, SyncMode, SyncMedia |
|
37 | 1 | def create_playlist(self, uri, name): |
|
38 | # Check if playlist creation is enabled |
||
39 | if self.configuration['sync.lists.personal.playlists'] is False: |
||
40 | log.info('No playlist found named %r ("Create playlists in plex" not enabled)', name) |
||
41 | return None |
||
42 | |||
43 | # Create playlist |
||
44 | return super(PersonalLists, self).create_playlist(uri, name) |
||
45 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.