| Conditions | 2 |
| Total Lines | 10 |
| Lines | 10 |
| Ratio | 100 % |
| Tests | 1 |
| CRAP Score | 4.3145 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | 1 | from plugin.preferences.options.core.base import SimpleOption |
|
| 26 | 1 | def on_database_changed(self, value, account=None): |
|
| 27 | if value not in IDLE_DELAY_IDS_BY_KEY: |
||
| 28 | log.warn('Unknown value: %r', value) |
||
| 29 | return |
||
| 30 | |||
| 31 | # Map `value` to plex preference |
||
| 32 | value = IDLE_DELAY_IDS_BY_KEY[value] |
||
| 33 | |||
| 34 | # Update preference |
||
| 35 | return self._update_preference(value, account) |
||
| 36 | |||
| 48 |