Conditions | 4 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | class HamaMapper(object): |
||
15 | def map_tvdb3(self, key, identifier=None, resolve_mappings=True): |
||
16 | # Find matching anidb service identifier |
||
17 | supported, match = self.mapper.map( |
||
18 | 'tvdb', key, |
||
19 | resolve_mappings=False, |
||
20 | use_handlers=False |
||
21 | ) |
||
22 | |||
23 | if not supported: |
||
24 | return False, None |
||
25 | |||
26 | if not match.identifiers or not match.identifiers.get('anidb'): |
||
27 | return False, None |
||
28 | |||
29 | # Map episode identifier with the `anidb_id` we've found |
||
30 | return self.mapper.map( |
||
31 | 'anidb', match.identifiers['anidb'], |
||
32 | identifier=identifier, |
||
33 | resolve_mappings=resolve_mappings |
||
34 | ) |
||
35 |