TCTorrent documentation

# TCTorrent plugin for Total Commander 2.1.2

## Plugin description

TCTorrent — is content/lister/packer(file structure view only) plugin for working with .torrent files. This impementation have different approach to visualize torrent file content instead existing plugins. All parts are fully support Unicode.

## Prerequisites

Latest versions of plugin was tested with:

- Total Commander 8.5 under Windows 7 (x64)
- Total Commander 9.22 under Windows 10 (x64)

## Installation

Just open wlx_wdx_tctorrent.zip in Total Commander, this will install the plugin automatically.

## Usage

Please refer Total Commander documentation on how to configure columns. You can select:

- Name
- Files count
- Total size
- Block size
- Block count
- Tracker ("Full" or "Host only")
- Created date
- SHA hash
- Program
- Comment
- Encoding
- Private
- Multifile
- Publisher
- Errors (contain the info about errors occured during parsing)
- Skipped Count (count of unsupported torrent file fields)

Torrent Name, Files count, Total size, Block size, Block count, Tracker, Created date, SHA hash, Comment and Errors.

In Lister part you can use context menu to copy either data only or whole info with formatting. If data have a links, they will appear in the context menu. Also search is working.

Export can have an icons too, but for converting them you need to have GDI+ installed. If you have at least WinXP, you most likely have it. Also, icons in resulting HTML will be visible in the modern browsers only, IE6 is out this range, sorry.

## Hotkeys

- Ctrl+A — select all
- Ctrl+C — copy data (without headers)
- Shift+Ctrl+C — copy all data (with headers)
- Shift+Ctrl+Down — expand all folders
- Shift+Ctrl+Up — collapse all folders
- Ctrl+E — export HTML
- Ctrl+D — open current torrent in associated (or custom) torrent client
- Ctrl+O — options
- Ctrl+Z — expand/collapse details section
- Ctrl+G — run URL if it exists in the selected line

## Options

Explanation of some non self-telling options:

Styles — Extension groups — here you can define the groups of extensions. After you done that, your group will appear in the available styles list, and you can set it's own color.

Magnet — Template for magnet — here you can enter the text that will be shown in the viewer (link itself still will be full). In this text you can use following substitutes:

- %HS — SHA1 hash
- %HB — BASE32 hash
- %N — name
- %T — tracker
- %S — size

Client — Custom torrent client — you can place here your own custom torrent client (for example portable one). In both fields you can use environment variables (for example %COMMANDER_PATH%). Paramaters field also accepts the following substitutes:

- %P — full path of current torrent file
- %F — parent folder of current torrent file
- %L — list with files selected in viewer (ANSI)
- %UL — list with files selected in viewer (UTF-16)

Also added a support for some specific features for console torrent-client aria2 (help for commandline parameters):

- %AI — list of indexes of files selected in viewer as " --bt-remove-unselected-file=true --select-file=<index>" (with leading space). If list is empty, parameter is replaced with an empty string, " --bt-remove-unselected-file=true --select-file=" is not in output.

Example:

-q -c -Z --no-conf --bt-enable-lpd=true --console-log-level=error --seed-time=0 --summary-interval=0%AI --file-allocation=none --no-file-allocation-limit=20000M --always-resume=true --stream-piece-selector=geom -d "%F" "%P"

## Ini-file only options

MarginLeft — left margin. Default is 3.

AdditionalInfoSeparator — string containing one ore more symbols for separator for additional data, by default "->".

### Domain substitution for links

For substitute one domain to other when clicking on link, create in the ini-file [Mirrors] section with pairs of values DomainName=MirrorName. For example:

    [Mirrors]
    domain.com=mirror.com

In this case when clicking on link http://domain.com/topic123.html will be opened http://mirror.com/topic123.html

## Version history

    Version 2.1.2 (2020-09-18)
    - WLX: Fixed high CPU load on some torrents

    Version 2.1.1a (2019-08-16)
    + Updated Ukrainian translation (thanks YuriPet)

    Version 2.1.1 (2019-08-09)
    - Small documentation fixes
    - WLX: Fixed work with mirrors
    * WLX: When running client normal/minimized then lister/TC window not loose focus

    Version 2.1.0 (2019-07-24)
    * Cnangelog see in he history of beta-versions

    Version 2.0.7 (2019-07-19) beta
    + WLX: Option for expanding non-standard info at open
    - WLX: Fix for non-standard info displaying when (un)folding
    * WLX: For client again changed %AI parameter behaviour

    Version 2.0.6 (2019-07-17) beta
    * WLX: For client changed %AI parameter behaviour
    + WLX: Client can be executed minimized/maximized/hidden
    + WLX: Language file can be in any common unicode encoding
    + WLX: Support empty environment variables for client

    Version 2.0.5 (2019-06-20) beta
    + WLX: Mirrors support for links (ini)
    + WLX: Support client path relative to plugin path
    + WLX: %AI in client params will create list of file indexes (for aria2)
    + WLX: %F in client params for parent path to torrent file
    + WLX: %UL in client params create unicode file list
    - WLX: Fixed TC crash when %L exists in the client params

    Version 2.0.4 (2019-03-31) beta
    + WDX: Added field with unsupported fields count
    + WLX: Added vieweing of non-standard fields for files
    + WLX: Better viewing of non-standard fields, in theory, almost all fields should be shown
    + Support for more fields with .utf-8 suffix (old BitComet)
    + WLX: Support publisher and publisher-url
    + Parser should be more tolerate to structure damaging
    - WLX: Fixed items unfolding when searhing
    + WLX: Ed2k links are detected as link too
    - WLX: Fixed wrong encoding in custom fields
    - WCX: Fixed size for files > 4Gb

    Version 2.0.3 (2019-03-24) beta
    * No more separate wdx (now it's have little sense)
    * Translation files are unicode now
    + Added simple WCX functionality (file browsing)
    - WLX: Fixed sometimes wrongly encoded comments (and maybe other sections too)
    * Default MS Sans Serif font changed to Microsoft Sans Serif (unicode)
    + Search can be performed with "whole words", "backward" and "case sensitive" options
    - Fixed search, now it search folder names too
    + WLX: Statusbar now show loaded status (success or error)
    + Parser: Errors are translated
    + Slightly redone error reporting (show in list, no more messageboxes)
    + Parser: Will try to fix some corrupted files to show it's content
    - Parser: Handle case, where "announce-list" is not a list actually
    - WLX: Almost removed list flickering

    Version 2.0.2 (2011-11-29)
    + Added Hungary translation
    - fixed bug with some torrents with "url-list" segment

    Version 2.0.1 (2011-11-29)
    * Updated Ukrainian translation (thanks Maximus)
    - Parser: Fixed error on some torrents with large text blocks

    Version 2.0.0 (2011-11-11)
    * WDX: Merged "Tracker" and "Tracker (host)" fields (with units use)

    Version 1.0.22 (beta) (2011-11-10)
    + Parser: Added more informative error handling
    - WLX: Fixed wrong thouthands separator on some locales
    - WLX: Duplicated text in lines where link was at end of text
    - Parser: Fixed error on files with corrupt "announce-list"
    - Parser: Fixed error with negative integers reading

    Version 1.0.21 (beta) (2011-11-09)
    + WLX: Template for Magnet displaying
    + WLX: Finally (?) fixed wrong text width calculation
    * WLX: Removed option to shorten magnet link in viewer (template now)

    Version 1.0.20 (beta) (2011-11-08)
    + WLX: Option to shorten magnet link in viewer
    + WLX: Added context menu item "Copy link"
    * WLX: Removed Ctrl+Click functionality (just click on link now)
    * WLX: Removed "Links" item from context menu
    - WDX: Wrong SHA1 displaying
    - WLX: Fixed position of link menu appearance
    - WLX: Finally fixed wrong text width calculation
    - WLX: Fixed size disappearing when "Hide bracket" enabled

    Version 1.0.19 (beta) (2011-11-03)
    + WLX: Configurable color for highlited items
    + WLX: Added left margin
    * WLX: Updated Ukrainian translation
    - WLX: Incorrect painting when window scrolled horizontally
    - WLX: Fixed (again) horizontal scrolling extent

    Version 1.0.18 (beta) (2011-11-02)
    + WLX: Links highlight directly in list
    + WLX: Brackets around size can be hidden
    - WLX: Horizontal scrollbar not appearing when on info widh > files width

    Version 1.0.17 (beta) (2011-10-25)
    + WLX: Ctrl+G hotkey to go link in selected line
    + WLX: Added horizontal scrollbar where needed
    - WLX: Fixed wrong detect string
    * WLX: Slightly improved loading speed

    Version 1.0.16 (beta) (2011-10-20)
    + WLX: Configurable Magnet generating
    + WLX: Added custom info displaying
    - WLX: Fixed bug when mouse dropping field in config
    + Added X64 version

    Version 1.0.15 (beta) (2010-12-27)
    + Parser preferable use ***.utf-8 tags if they found
    + WLX: Added converting some asian encodings, if they are correctly defined in the file
    - WLX: Fixed crash on some invalid torrents
    - WLX: Fixed copying non-latin text in the clipboard

    Version 1.0.14 (beta) (2010-12-25)
    + WDX: Enabled background torrent loading
    + WDX: Added cache to speedup repeating browsing

    Version 1.0.13 (beta) (2010-12-25)
    - WDX: Not counting total torrent size
    - Various Fixes related to UTF-8 processing
    - Unicode Support was disabled
    * Changed types of Multifile and Private fields to boolean
    + WDX: Added forgotten Multiline field

    Version 1.0.12 (beta) (2010-12-24)
    + WDX: Added field that contain tracker host only (http://bt.tracker.org/announce -> bt.tracker.org)
    - WLX: New fields are not added in list
    + WLX: Added field with Magnet URI
    + WLX: Added various hotkeys
    - WLX: Fixed the problem when plugin block dir renaming, where just viewed torrent was
    - WLX: Fixed searching non-latin text
    + WLX: Unicode support, safely work only with really UTF-8 encoded torrents
    + WLX: Added "Webseeds" field
    + Added "Multifile" field
    * "Private" flag now is separate field
    * Field "Additionally" removed — all possible new parameters will have own fields
    * Various speed optimizations
    * Written own torrent-file parser, speed increased in ~2 times

    Version 1.0.11 (beta) (2010-07-08)
    + Added moving fields in options by keyboard (Ctrl+Arrows)
    - Fixed small bugs

    Version 1.0.10 (beta) (2010-07-06)
    + Added ability to reorder fields
    + Added setting to select custom torrent client
    - Fixed changing list items in option dialog by keyboard

    Version 1.0.9 (beta) (2010-06-30)
    + Coloring files by their extension

    Version 1.0.2 (2010-06-30)
    - Small language fix
    - Fixed incorrect "e" char in the "Created" field name. If you use it, you have to fix it in your configuration.

    Version 1.0.1 (2010-06-26)
    - Fixed wdx crash on files with unicode names without associated short ones (thanks CheeseCake)

    Version 1.0.0 (2010-06-24)
    - Fixed wrong displaying of size values with "Thouthands separator" enabled (thanks za222)
    - Fixed work with keyboard when switching to plugin in Ctrl+Q mode (thanks Den_Klimov)

    Version 0.93 (2010-03-14)
    + Spanish translation (thanks Jose Manuel Breto)
    - Fixed focus catching in Ctrl+Q mode
    - Fixed crash when Esc pressed in Ctrl+Q mode

    Version 0.92 (2009-12-16)
    + Ukrainian translation (thanks Maximus)
    + Option to remember or not export path
    * "About" dialog info moved to options tab
    - Fixed bug when WLX don't show trackers on torrents with missing "announce"

    Version 0.91 (2009-11-30)
    + Plugin trying to hide passkey when export html (optionally)
    - Fixed incorrect handling of trackers list that lead to duplicate url's

    Version 0.90 (2009-11-20)
    + Ctrl+Click opens URL found in data (menu appear if count > 1)
    + Torrent file name suggested for export name
    + Plugin will not show text about client, if client is not installed
    * Styles are resets to default independently
    * Auto line height now 0 instead -1 (cosmetic)
    * No duplicates allowed in the trackers list
    - Fixed crash on files with missing "announce" segment
    - Fixed copying to clipdoard on systems with non-latin codepage

    Version 0.89 (2009-11-07)
    - Fixed error when switching to another plugin by pressing "4"
    - Fixed view form translation when it's chosen manually

    Version 0.88 (2009-11-06)
    * Now export output is UTF-8
    + Overwrite prompt for export
    + Added ability for line height manual setting
    - Fixed small bug with URL detection
    - Fixed size units in export

    Version 0.87 (2009-10-29)
    + Added simple HTML export (for icons export needed GDI+)

    Version 0.86 (2009-10-29)
    + Dramatically increased loading speed
    - Probably fixed bug with crashing when loading certain torrents

    Version 0.85 (2009-10-28)
    * Increased speed of unicode version of WDX
    + Unicode WDX is now really unicode
    + Reset styles to default button
    + Option to expand all items at startup
    + Files counter (may be wrong on unicode names)
    - Fixed accidental crashes in the unicode WDX
    - Fixed incorrect calculation of information splitter
    - Changed parser to not fail on corrupt "announce-list" segments

    Version 0.81 (2009-10-22)
    + Ability for manual language setting in case of wrong detection
    - Probably fixed bug with disappearing icons

    Version 0.80 (2009-10-21)
    * TCTorrent.sample.ini is not needed anymore, ini created automatically
    * Some ini keys changed, recommended to delete old ini before use this version
    + Thousands separators for sizes
    + Options dialog
    + Now multiline comments are actually multiline and expandable
    - Fixed language detection method
    - Fixed incorrect behaviour of about dialog

    Version 0.71 (2009-10-05)
    + Copying sample ini file if no working copy found
    - Fixed disappearing of client icon after about calling
    - Fixed two bugs with expand/collapse items

    Version 0.70 (2009-10-01)
    + Ability to use large icons
    + Added detection when strings in torrent file saved as ANSI
    + Significally icreased loading speed
    + Menu items for expand/collapse all folders
    + Rounding size values to integer
    + Folding items by pressing return
    + Added unicode support for WDX
    * Changed method of showing progressbar
    - Fixed search function when multiple lister windows are open
    - Flickering when clicking by right mouse button
    - Fixed work with files that have unicode in names
    - Fixed crash on torrents with huge comments

    Version 0.60 (2009-09-29)
    + Progress bar will appear when loading torrents with large files count
    + Optional displaying of associated icons
    + Options for displaying size (auto, or fixed units)
    + Optional state of extra info at startup (folded or not)
    + Setting of custom items colors and fonts
    + Status bar
    + Folding info
    + Added 3 params to WDX: Program name, Encoding and Private flag.
    + Lister window starts focused
    + Aligning of sizes
    - Fixed wrong folder size
    - Fixed compatibility with Universal Viewer

    Version 0.50 (2009-09-23)
      First public release.

## Credits

Christian Ghisler — for infinitely powerful tool.

Maximus, YuriPet — Ukrainian translation

Jose Manuel Breto — Spanish translation

Bluestar — Hungarian translation

## License

Copyright (c) 2009-2019 Dmitry Yudin

E-Mail: loopback@darkhost.ru

This plugin is freeware.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.