All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.frostwire.jlibtorrent.alerts.TorrentUpdateAlert Maven / Gradle / Ivy

There is a newer version: 1.2.0.18
Show newest version
package com.frostwire.jlibtorrent.alerts;

import com.frostwire.jlibtorrent.Sha1Hash;
import com.frostwire.jlibtorrent.swig.torrent_update_alert;

/**
 * When a torrent changes its info-hash, this alert is posted. This only happens in very
 * specific cases. For instance, when a torrent is downloaded from a URL, the true info
 * hash is not known immediately. First the .torrent file must be downloaded and parsed.
 * 

* Once this download completes, the {@link com.frostwire.jlibtorrent.alerts.TorrentUpdateAlert} is * posted to notify the client of the info-hash changing. * * @author gubatron * @author aldenml */ public final class TorrentUpdateAlert extends TorrentAlert { public TorrentUpdateAlert(torrent_update_alert alert) { super(alert); } /** * The previous info-hash for the torrent. * * @return */ public Sha1Hash getOldInfoHash() { return new Sha1Hash(alert.getOld_ih()); } /** * The new info-hash for the torrent. * * @return */ public Sha1Hash getNewInfoHash() { return new Sha1Hash(alert.getNew_ih()); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy