Class TorrentUtil

java.lang.Object
com.biglybt.ui.swt.TorrentUtil

public class TorrentUtil extends Object
  • Field Details

  • Constructor Details

    • TorrentUtil

      public TorrentUtil()
  • Method Details

    • init

      public static void init()
    • fillTorrentMenu

      public static void fillTorrentMenu(org.eclipse.swt.widgets.Menu menu, DownloadManager[] dms, Core core, boolean include_show_details, int selected_dl_types, TableView tv)
    • addNetworksSubMenu

      protected static void addNetworksSubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuNetworks)
    • addPeerSourceSubMenu

      protected static void addPeerSourceSubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuPeerSource)
    • exportHTTPSeeds

      protected static void exportHTTPSeeds(DownloadManager[] dms)
    • exportTorrent

      protected static void exportTorrent(DownloadManager[] dms, org.eclipse.swt.widgets.Shell parentShell)
    • exportTorrent

      public static void exportTorrent(String torrent_name, TOTorrent torrent, org.eclipse.swt.widgets.Shell parentShell)
    • exportTorrents

      public static void exportTorrents(String[] torrent_names, TOTorrent[] torrents, org.eclipse.swt.widgets.Shell parentShell)
    • pauseDownloadsFor

      protected static void pauseDownloadsFor(DownloadManager[] dms)
    • addSpeedLimitsMenu

      protected static void addSpeedLimitsMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menu)
    • addEditWebseeds

      public static void addEditWebseeds(org.eclipse.swt.widgets.Menu menu, DownloadManager[] dms)
    • addTrackerTorrentMenu

      protected static void addTrackerTorrentMenu(org.eclipse.swt.widgets.Menu menuTracker, DownloadManager[] dms, boolean changeUrl, boolean manualUpdate, boolean allStopped, boolean use_open_containing_folder, boolean canMove)
    • moveTorrentFile

      protected static void moveTorrentFile(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms)
    • moveDataFiles

      public static void moveDataFiles(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, boolean batch)
    • clearMOC

      protected static void clearMOC(DownloadManager[] dms)
    • getMOC

      protected static String getMOC(DownloadManager[] dms)
    • setMOC

      protected static void setMOC(DownloadManager[] dms, String path)
    • selectMOC

      protected static void selectMOC(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, Consumer<String> moc_setter)
    • exportDownloads

      protected static void exportDownloads(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms)
    • repositionManual

      public static void repositionManual(TableView<DownloadManager> tv, DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell, boolean isSeedingView)
    • addCategorySubMenu

      protected static void addCategorySubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuCategory)
    • moveSelectedTorrentsTo

      private static void moveSelectedTorrentsTo(TableView<DownloadManager> tv, DownloadManager[] selected_dms, int iNewPos)
    • moveSelectedTorrentsTo

      private static void moveSelectedTorrentsTo(GlobalManager gm, List<DownloadManager> all_dms, List<DownloadManager> selected_dms, int iNewPos)
    • changeDirSelectedTorrents

      protected static void changeDirSelectedTorrents(DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell)
    • runDataSources

      public static void runDataSources(Object[] datasources)
      Runs a DownloadManager or DiskManagerFileInfo
    • hostTorrents

      public static void hostTorrents(Object[] download_managers)
    • publishTorrents

      public static void publishTorrents(Object[] download_managers)
    • removeDataSources

      public static void removeDataSources(Object[] datasources)
      Parameters:
      datasources - DownloadManager, DiskManagerFileInfo, SelectedContent
    • shouldStopGroupTest

      public static Boolean shouldStopGroupTest(Object[] datasources)
    • stopOrStartDataSources

      public static void stopOrStartDataSources(Object[] datasources, boolean extendedAction)
    • stopDataSources

      public static void stopDataSources(Object[] datasources)
    • stopDataSources

      public static void stopDataSources(Object[] datasources, boolean pause)
    • pauseDataSources

      public static void pauseDataSources(Object[] datasources)
    • queueDataSources

      public static void queueDataSources(Object[] datasources, boolean extendedAction)
    • resumeTorrents

      public static void resumeTorrents(Object[] download_managers)
    • assignToCategory

      public static void assignToCategory(Object[] download_managers, Category category)
    • promptUserForComment

      public static void promptUserForComment(DownloadManager[] dms)
    • promptUserForComment

      public static void promptUserForComment(String text, Consumer<String> consumer)
    • promptUserForDescription

      public static void promptUserForDescription(DownloadManager[] dms)
    • toDMS

      private static DownloadManager[] toDMS(Object[] objects)
    • toDownloadStubs

      private static DownloadStub.DownloadStubEx[] toDownloadStubs(Object[] objects)
    • toDMFI

      private static DiskManagerFileInfo[] toDMFI(Object[] objects)
    • isFileTorrent

      public static boolean isFileTorrent(String originatingLocation, File torrentFile, String torrentName, boolean warnOnError)
      quick check to see if a file might be a torrent
      Parameters:
      torrentFile -
      Returns:
      Since:
      3.0.2.3
    • calculateToolbarStates

      public static Map<String,Long> calculateToolbarStates(ISelectedContent[] currentContent, String viewID_unused)
    • removeDownloads

      public static void removeDownloads(DownloadManager[] dms, AERunnable deleteFailed)
    • removeDownloads

      public static void removeDownloads(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt)
    • removeDownloadsSupport

      private static void removeDownloadsSupport(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt)
    • removeDownloadsPrompterClosed

      private static void removeDownloadsPrompterClosed(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent)
    • removeDownloadsPrompterClosedSupport

      private static void removeDownloadsPrompterClosedSupport(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent)
    • removeDownloadStubs

      public static void removeDownloadStubs(DownloadStub.DownloadStubEx[] dms, AERunnable deleteFailed, boolean forcePrompt)
    • removeDownloadStubsPrompterClosed

      private static void removeDownloadStubsPrompterClosed(DownloadStub.DownloadStubEx[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent)
    • isForceStartVisible

      public static boolean isForceStartVisible(DownloadManager[] dms)