def _process_provider_torrent(self, torrent, provider_name, info): torrent['type'] = 'torrent' if not torrent.get('info'): torrent['info'] = source_utils.get_info(torrent['release_title']) torrent['quality'] = torrent.get('quality', '') if torrent['quality'] not in approved_qualities: torrent['quality'] = source_utils.get_quality(torrent['release_title']) torrent['hash'] = torrent.get('hash', self.hash_regex.findall(torrent['magnet'])[0]).lower() torrent['size'] = torrent.get('size', 0) torrent['size'] = self._torrent_filesize(torrent, info) if 'provider_name_override' in torrent: torrent['provider'] = torrent['provider_name_override'] else: torrent['provider'] = provider_name
def _finalise_identified_items(self, items): for item in items: item.update({ 'quality': source_utils.get_quality(item['release_title']), 'language': self.language, 'provider': 'Cloud', 'type': 'cloud', 'info': source_utils.get_info(item['release_title']), 'debrid_provider': self.debrid_provider, }) return items