'WIP
Download and store torrent details
:param torrent_id:
:return:'

@cache_required
@with_session
def details(self, torrent_id, session=None):

    details = session.query(Torrent).filter((Torrent.id == torrent_id)).first()
    if details:
        return details
    else:
        log.debug(u'Torrent    %d    cache    miss.    Online    retrieving...', torrent_id)
        json_details = self.rest_client.details(torrent_id)
        def resolver(category_id, term_type_name, term_name):
            return self.find_term(category_id, term_type_name, term_name, session=session)
        details = self.mapper.map_details(json_details, resolver)
        session.add(details)
        session.commit()
        return details
