Package org.gudy.azureus2.core3.torrent

Examples of org.gudy.azureus2.core3.torrent.TOTorrent


                String  description    = null;
               
                try{
                  Torrent torrent = file.getSourceFile().getDownload().getTorrent();
               
                  TOTorrent toTorrent = PluginCoreUtils.unwrap(torrent);
             
                  long duration_secs = PlatformTorrentUtils.getContentVideoRunningTime(toTorrent);
                 
                  if ( mediaContent.length() > 0 && duration_secs > 0 ){
                   
View Full Code Here


    boolean advanced_view = true;
   
    if ( !dm.getDownloadState().getFlag( DownloadManagerState.FLAG_LOW_NOISE )){
     
      TOTorrent torrent = dm.getTorrent();
      if (torrent == null) {
        advanced_view = false;
      } else {
        URL announceURL = torrent.getAnnounceURL();
 
        if (announceURL != null) {
          String  host = announceURL.getHost();
         
          if (!( host.endsWith(AELITIS_HOST_CORE)|| host.endsWith( VUZE_HOST_CORE ))){
            advanced_view = false;
          }
        }
       
        if (advanced_view) {
          TOTorrentAnnounceURLSet[] sets = torrent.getAnnounceURLGroup().getAnnounceURLSets();
 
          for (int i = 0; i < sets.length; i++) {
 
            URL[] urls = sets[i].getAnnounceURLs();
 
View Full Code Here

    }
    return name;
  }
 
  public static void setHasBeenOpened(DownloadManager dm, boolean opened) {
    TOTorrent torrent = dm.getTorrent();
    if (torrent == null) {
      return;
    }
    if (opened == getHasBeenOpened(dm)) {
      return;
View Full Code Here

      }
    }
  }

  public static boolean getHasBeenOpened(DownloadManager dm) {
    TOTorrent torrent = dm.getTorrent();
    if (torrent == null) {
      return true;
    }
    boolean opened = getContentMapLong(torrent, TOR_AZ_PROP_OPENED, -1) > 0;
    if (opened || isAdvancedViewOnly(dm)) {
View Full Code Here

    disk_access_controller  = DiskManagerImpl.getDefaultDiskAccessController();
       
    download_state  = new LWSDiskManagerState();
   
    TOTorrent  torrent = lws.getTOTorrent( false );
   
    pieces = new sePiece[ torrent.getNumberOfPieces() ];
   
    for (int i=0;i<pieces.length;i++){
     
      pieces[i] = piece;
    }
View Full Code Here

 
  public void
  start()
  {
    try{
      TOTorrent  torrent = lws.getTOTorrent( false );
     
      internal_name = ByteFormatter.nicePrint(torrent.getHash(),true);
     
      LocaleUtilDecoder  locale_decoder = LocaleTorrentUtil.getTorrentEncoding( torrent );
     
      piece_mapper = DMPieceMapperFactory.create( torrent );
     
View Full Code Here

   
    DiskManagerFileInfoImpl[]  local_files = new DiskManagerFileInfoImpl[pm_files.length];
   

    try{
      TOTorrent  torrent = lws.getTOTorrent( false );
     
      if ( torrent.isSimpleTorrent()){
       
        save_location = save_location.getParentFile();
      }
   
      for (int i = 0; i < pm_files.length; i++) {
View Full Code Here

  }
 
  public byte[]
  getHash()
  {
    TOTorrent t = download_manager.getTorrent();
   
    if ( t == null ){
     
      return( null );
    }
   
    try{
     
      return( t.getHash());
     
    }catch( Throwable e ){
   
      return( null );
    }
View Full Code Here

  }
 
  public boolean
  isPlatform()
  {
    TOTorrent  torrent = download_manager.getTorrent();
   
    if ( torrent != null ){
     
      return( PlatformTorrentUtils.isContent( torrent, true ));
    }
View Full Code Here

 
  public boolean
  supportsProgressiveMode()
  {
    TOTorrent  torrent = download_manager.getTorrent();
   
    if ( torrent == null ){
     
      return( false );
    }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.torrent.TOTorrent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.