picotorrent / picotorrent Goto Github PK
View Code? Open in Web Editor NEWA tiny, hackable BitTorrent client.
Home Page: https://picotorrent.org
License: MIT License
A tiny, hackable BitTorrent client.
Home Page: https://picotorrent.org
License: MIT License
It would be nice to be able to select multiple torrents in the torrent view.
Right now I need to select every torrent individually to remove them and it would be nice to be able to do this in one step.
The peer flags (as shown in the peer list view) does not show the complete list of flags for each peer. Since we use libtorrent, we can use the same type of flags as qBittorrent (who also uses libtorrent).
See https://github.com/qbittorrent/qBittorrent/blob/69d52a06d757ab0ca250da3df31800edc92d69b1/src/base/bittorrent/peerinfo.cpp#L287 on how to calculate the same peer flags.
The libtorrent session has a function called set_load_function
that allows us to register a callback which to load torrent files on the fly. This allows libtorrent to unload them from memory and only load them on demand, reducing memory usage.
Have the possibility for a torrent with several files to set a sertain file to prioritized.
May be it could remove the older install before installing the newer one.
I think the save path dialog should show the files in folders even if you only are supposed to choose a folder.
The files should not be able to be selected as savepath.
The torrent context menu should contain an option to view the details dialog so it is not as hidden. Right now only double-clicking or pressing Enter will open the details dialog.
If you go to the connection tab in the settings dialog and then attempt to click on either apply/ok buttons to save changes/close the window, picotorrent crashes (cancel button exits dialog fine), even if you switch back to downloads tab before attempting to save/close.
However if you only stay on the downloads tab, it doesn't crash.
OS: Windows 10 N x64
PicoTorrent-0.4.0-x64.zip (portable version)
Log from crash (x64)
INFO - 17:58:05.239 - picotorrent::core::session::load - Loading session
INFO - 17:58:05.356 - picotorrent::core::session::load_state - Session state loaded
INFO - 17:58:05.356 - picotorrent::core::session::load_torrents - Loading 0 torrent(s)
FATAL - 17:58:09.198 - picotorrent::logging::log::on_unhandled_exception - Unhandled exception occured
at "RaiseException"
at "CxxThrowException"
at "std::_Xinvalid_argument"
at "<unknown>"
at "<unknown>"
at "<unknown>"
at "IsDialogMessageW"
at "IsDialogMessageW"
at "IsDialogMessageW"
at "DispatchMessageW"
at "SendMessageW"
If I paste a URL to a torrent in the Add Torrent dialog and hit Open, PicoTorrent crashes on this line.
fs::path p(path) throws an exception because it appears path is NULL, and then that exception gets caught when it leaves the callback and turns into this hard-to-debug-from-a-dmp exception:
EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007fff487d72cb (user32!DefDlgProcW+0x0000000000000053)
ExceptionCode: c000041d
ExceptionFlags: 00000001
NumberParameters: 0DEFAULT_BUCKET_ID: APPLICATION_FAULT
PROCESS_NAME: PicoTorrent.exe
ERROR_CODE: (NTSTATUS) 0xc000041d - An unhandled exception was encountered during a user callback.
EXCEPTION_CODE: (NTSTATUS) 0xc000041d - An unhandled exception was encountered during a user callback.
Checking the return code from IShellItem::GetDisplayName might help skip over bad items, or catching the exception and returning false from the open_torrent_dialog::on_file_ok might be sufficient to stop it from crashing.
Alternative for go to folder where file is.
Would be nice if the choosen destination path would be saved for future torrents.
[edited]
With browse button.
I'd be great if progress was also displayed on Windows taskbar button so that I don't have to open PicoTorrent to see what's going on.
I'm talking about something like this: http://www.codeproject.com/Articles/42345/Windows-Goodies-in-C-Taskbar-Progress-and-Status
Thanks for PicoTorrent! :)
When you click File -> Add torrent and then abort(press close) you still get the save destination dialog.
Whenever I upgrade with Chocolatey, the torrents I was seeding are gone.
Is it planned to support 32-bit Windows too? (memory efficient, preinstalled on a notebook etc.)
We should add an About dialog under Help -> About
that shows the current version of PicoTorrent, along with the Git commitish, build date and contributor information.
Can you do it?
PicoTorrent should implement a unique peer id so trackers can identify it. The goal should be to always run with the PicoTorrent-specific peer id, however until widely accepted it should be an advanced setting which can be enabled/disabled via an experimental group in an advanced preferences page.
Looking at the BitTorrent specification I see that we can probably use PI
as our Azureus-style client id.
peer_fingerprint
to -PIxyyz-
where x is major version, yy is minor version padded to two characters (ie. 01 or 14) and z is the patch version.user_agent
to PicoTorrent/x.y.x
where x.y.x is the current PicoTorrent version.use_picotorrent_peer_id
(which should default to false
) and set the above settings accordingly when reloading session settings.If you select an item in the peer list tab and then scroll it out of view, picotorrent "crashes" on the next update cycle.
Currently in 0.5, it just 'freezes' the ui (libtorrent is still downloading in the background, but picotorrent.exe enters 'not responding' state)
However in PR #108, it just flat out crashes picotorrent. Log from PR #108 appveyor x64 build below.
INFO - 11:06:55.543 - picotorrent::core::session::load - Loading session
TRACE - 11:06:55.651 - picotorrent::core::session::load_state - State file does not exist
INFO - 11:06:55.652 - picotorrent::core::session::load_torrents - Loading 0 torrent(s)
INFO - 11:06:58.531 - picotorrent::ui::sleep_manager::refresh - Preventing computer from sleeping
FATAL - 11:07:07.771 - picotorrent::logging::log::on_unhandled_exception - Unhandled exception occured
at "RaiseException"
at "RaiseException"
at "CxxThrowException"
at "std::_Throw_Cpp_error"
at "std::_Throw_C_error"
at "picotorrent::ui::property_sheets::details::peers_page::on_list_display" (line 107)
at "std::_Invoker_pmf_pointer::_Call<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*)(std::pair<int,int> const & __ptr64) __ptr64,picotorrent::ui::dialogs::add_torrent_dialog * __ptr64 & __ptr64,std::pair<int,int> const & __ptr64>" (line 1313)
at "std::invoke<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*& __ptr64)(std::pair<int,int> const & __ptr64) __ptr64,picotorrent::ui::dialogs::add_torrent_dialog * __ptr64 & __ptr64,std::pair<int,int> const & __ptr64>" (line 1416)
at "std::_Invoke_ret<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*& __ptr64)(std::pair<int,int> const & __ptr64) __ptr64,picotorrent::ui::dialogs::add_torrent_dialog * __ptr64 & __ptr64,std::pair<int,int> const & __ptr64>" (line 1448)
at "std::_Call_binder<std::_Unforced,0,1,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*)(std::pair<int,int> const & __ptr64) __ptr64,std::tuple<picotorrent::ui::dialogs::add_torrent_dialog * __ptr64,std::_Ph<1> >,std::tuple<std::pair<int,int> const & __ptr64> >" (line 791)
at "std::_Binder<std::_Unforced,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*)(std::pair<int,int> const & __ptr64) __ptr64,picotorrent::ui::dialogs::add_torrent_dialog * __ptr64 const,std::_Ph<1> const & __ptr64>::operator()<std::pair<int,int> const & __ptr64>" (line 847)
If i run the application 24/7 i want the ability to check for updates without restarting the client.
The configuration dialog needs some work to make it easier to use and also to provide the user with more settings.
Extending the configuration dialog should be done in two parts, one to separate configuration views into different pages which can be loaded from their own DIALOGEX
resource identifiers, and another one to add more configuration options to the dialog.
The following new config settings should be exposed in the dialog,
.incomplete
)Will there be a Mac version?
Out of habit I always close the window only to realize later that this also closes the program.
If an option was added which when selected, minimized the window to the taskbar when closed.
This small feature addition would be much appreciated by noobs like me everywhere ๐
Currently we can only view trackers in the torrent details, there is no way to add or remove trackers.
This'd be a nice feature to have
The unhandled exception handler does some stack walking to provide a nice stack trace for debugging and reporting issues. Currently, the x86 version is broken and will not stack walk correctly.
The tracker list view (shown in the torrent details dialog) should also show statistics on seeds/peers and time until next announce.
When you set the priority of the last file in a torrent to 'Do not download' in the 'Add torrent' dialog, picotorrent crashes when you attempt add it.
INFO - 23:03:25.961 - picotorrent::core::session::load - Loading session
INFO - 23:03:26.82 - picotorrent::core::session::load_state - Session state loaded
INFO - 23:03:26.82 - picotorrent::core::session::load_torrents - Loading 0 torrent(s)
FATAL - 23:03:32.410 - picotorrent::logging::log::on_unhandled_exception - Unhandled exception occured
at "RaiseException"
at "CxxThrowException"
at "std::_Xout_of_range"
at "std::map<libtorrent::sha1_hash,std::shared_ptr<picotorrent::core::torrent>,std::less<libtorrent::sha1_hash>,std::allocator<std::pair<libtorrent::sha1_hash const ,std::shared_ptr<picotorrent::core::torrent> > > >::at" (line 359)
at "picotorrent::core::session::notify" (line 422)
at "picotorrent::common::signals::signal<void,void>::emit" (line 106)
at "picotorrent::ui::main_window::wnd_proc" (line 203)
at "picotorrent::ui::main_window::wnd_proc_proxy" (line 540)
at "DispatchMessageW"
at "DispatchMessageW"
at "picotorrent::app::message_loop::run" (line 12)
Also, if you set the last file's priority to 'High' or 'Maximum', when you add the torrent all of the other files get set to 'Do not download' (strangely it doesn't crash)
edit: crashes with single file torrents as well when you set the priority to 'Do not download'
I don't know you, but I already love you.
I was so annoyed about the way uTorrent turned out but now you filled my pirate heart with torrent joy. โค๏ธ
I know nothing to little C++ but I definitely can help you with the site.
Cheers!
The torrent list view shows a fully enabled context menu even though no torrent is selected.
Cannot run this program, as dlls are missing. Include them into compiled binary.
The torrent list view should be rewritten to use the same list view class as the other list views in PicoTorrent. The shared list view class is better in all aspects but lack sorting, which can be easily implemented.
PicoTorrent should have an option to prevent the computer from sleeping while having active downloads (downloading and total_wanted - total_wanted_done > 0
).
Hi,
just flew over your code and saw this line:
https://github.com/picotorrent/picotorrent/blob/develop/src/mainwindow.cpp#L148
I'm not a c++ programmer, but maybe you can replace the (your?) name with %USERPROFILE% ... and use ExpandEnvironmentStrings to resolve it. (Maybe the function call is not even necessary)
version: 0.5 x64 portable
Just attempted to add a torrent with >255 files and picotorrent crashed.
Did some testing and it appears to be around 255, I added a torrent with 254 files and it didn't crash, but when I attempted a torrent with 256 files it crashed.
INFO - 20:46:38.369 - picotorrent::core::session::load - Loading session
INFO - 20:46:38.482 - picotorrent::core::session::load_state - Session state loaded
INFO - 20:46:38.482 - picotorrent::core::session::load_torrents - Loading 0 torrent(s)
FATAL - 20:46:41.460 - picotorrent::logging::log::on_unhandled_exception - Unhandled exception occured
at "picotorrent::core::add_request::file_priority" (line 36)
at "picotorrent::core::add_request::file_priority" (line 36)
at "picotorrent::app::controllers::add_torrent_controller::show_torrent" (line 249)
at "picotorrent::app::controllers::add_torrent_controller::on_dialog_init" (line 147)
at "picotorrent::ui::dialogs::add_torrent_dialog::on_init_dialog" (line 170)
at "picotorrent::ui::dialogs::dialog_base::dlg_proc" (line 90)
at "picotorrent::ui::dialogs::dialog_base::dlg_proc_proxy" (line 112)
at "IsDialogMessageW"
at "IsDialogMessageW"
at "IsDialogMessageW"
at "DispatchMessageW"
While port can be up to 65k, config allows you to enter only 4 num.
Funny thing is that you can enter some non-numeric character :)
p.s. manual edit of config works of course :)
Whenever the download or upload speed values are updated it seems like the whole block of text(which includes the torrent name and progress) to blink.This happens on every update.
That said this a minor annoyance, but if anything could be done to remedy this it'd be great.
I'm on Windows 7 SP1 x64(just in case this is OS specific)
This would be a nice option to have โ especially since .torrents are not always available.
Would love if you could split the remove option up.
99% of the times I delete a torrent I want to keep my files. Quite annoying when I have to select that I want to keep the files every time I remove a torrent, with the risk of hitting the wrong one and removing the files. I'm used to having two delete options on dropdown, "Remove" and "Remove and delete files". Del button should bind to remove and keep files and shift+del should bind to remove and delete files. If possible :)
Love your work!
All files are added without taking into account directory structure.
I.e. if you have torrent with directories pico will ignore it and just adds only files.
Example of torrent: http://www.nyaa.se/?page=download&tid=776448
It's structure:
CD1/*.flac
CD2/*.flac
UPD:
Actual issue is only the fact that file structure is not displayed correctly during torrent's adding
PicoTorrent captures Ctrl+A globally and does not let any other application use that hotkey while its running.
The PicoTorrentCore project should be made cross-platform so we can start building Linux and OSX clients.
PicoTorrent requires msvcp140.dll in order to run, which is not included in the portable (archived) packages. For more information please have a look at this forum thread:
http://www.portablefreeware.com/forums/viewtopic.php?f=4&t=22517
A setting(checkbox) that allows for auto download to default path. (No dialogs on magnet click just start downloading).
I would like to be able to exclude some files from torrent that I'm not interested in.
Have an option to set global UL/DL limits, so for example if I know I can use the internet comfortably while seeding at 50kb/s I'll just set this globally and PicoTorrent will make sure the total UL of all torrents stays below 50kb/s.
Currently you can only set these limits per torrent, which is unfortunate since you have to manually balance them when seeding multiple torrents, since setting them each to 50kb/s will not keep the total bandwidth at this level
The list view showing torrents should be able to handle configured column sets to allow users to switch between different views.
For example, the pre-specified column set Pico
could show the columns Name, Queue position, Progress and ETA, and the set Detailed
with the columns Name, Queue position, Size, Status, Progress, ETA, DL, UL.
The option to switch column sets would be in View -> Column sets -> Pico/Detailed
.
When one or more torrents are selected, the Delete
key should bind to Remove
in the context menu.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.