Changeset 10072


Ignore:
Timestamp:
Feb 2, 2010, 1:15:26 AM (12 years ago)
Author:
charles
Message:

(trunk libT) #2720 "Misleading error message when adding a duplicate magnet transfer" -- add a public API call in libtransmission for testing to see if we already have a magnet link as a torrent

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r9979 r10072  
    9898
    9999tr_torrent*
     100tr_torrentFindFromMagnetLink( tr_session * session, const char * magnet )
     101{
     102    tr_magnet_info * info;
     103    tr_torrent * tor = NULL;
     104
     105    if(( info = tr_magnetParse( magnet )))
     106    {
     107        tor = tr_torrentFindFromHash( session, info->hash );
     108        tr_magnetFree( info );
     109    }
     110
     111    return tor;
     112}
     113
     114tr_torrent*
    100115tr_torrentFindFromObfuscatedHash( tr_session * session,
    101116                                  const uint8_t * obfuscatedTorrentHash )
  • trunk/libtransmission/transmission.h

    r9965 r10072  
    10631063tr_torrent* tr_torrentFindFromHash( tr_session * session, const uint8_t * hash );
    10641064
     1065/** @brief Convenience function similar to tr_torrentFindFromHash() */
     1066tr_torrent* tr_torrentFindFromMagnetLink( tr_session * session, const char * link );
    10651067
    10661068
Note: See TracChangeset for help on using the changeset viewer.