aMule Forum

English => Feature requests => Topic started by: xplode_me on April 14, 2008, 10:27:03 PM

Title: Feedback from shared files
Post by: xplode_me on April 14, 2008, 10:27:03 PM
Currently it's not possible to "copy  feedback to clipboard" of shared files, only of active transfers. Is this a bug, or isn't it implemented yet?

thanks
Title: Re: Feedback from shared files
Post by: myth on April 28, 2008, 10:14:42 PM
Code: [Select]
void CSharedFilesCtrl::OnGetFeedback(wxCommandEvent& WXUNUSED(event))
{
wxString feed;
long index = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
while (index != -1) {
CKnownFile* file = (CKnownFile*)GetItemData(index);

Here?==> if (file->IsPartFile()) {
Here?==> feed += dynamic_cast<CPartFile*>(file)->GetFeedback();
   }

index = GetNextItem(index, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
}
if (!feed.IsEmpty()) {
theApp->CopyTextToClipboard(feed);
}
}
Title: Re: Feedback from shared files
Post by: GonoszTopi on April 28, 2008, 11:30:51 PM
I'll take a look.
Title: Re: Feedback from shared files
Post by: myth on April 29, 2008, 04:52:40 PM
Thank you very much!  :)
Title: Re: Feedback from shared files
Post by: GonoszTopi on April 30, 2008, 01:55:40 AM
Feedback from shared files is now possible.
Title: Re: Feedback from shared files
Post by: myth on April 30, 2008, 04:43:23 PM
Don't misunderstand me, but i love you! :P

Great work!!!

THX very much!
Title: Re: Feedback from shared files
Post by: myth on May 04, 2008, 12:46:27 PM
hmm...here is a problem....i want to copy feedback of an complete file, and look what comes out:

Code: [Select]
Feedback from: [DCON] MyTh [X-T HD] (aMule SVN using wxGTK2 v2.8.7 (Snapshot: Wed Apr 30 07:01:48 CEST 2008))

File name: Der.Ausbruch.des.St.Helens.for.maultier-power.com.avi
File size: 347.26 MB
Downloaded: Complete
Complete Sources: 38

For else other file it copy's everything good like this:

Code: [Select]
Feedback from: [DCON] MyTh [X-T HD] (aMule SVN using wxGTK2 v2.8.7 (Snapshot: Wed Apr 30 07:01:48 CEST 2008))

File name: xyz.pdf
File size: 190 kB
Share ratio: 400.00%
Transferred: 0 bytes (760 kB)
Requested: 0 (5)
Accepted: 0 (4)
Complete Sources: 0


Now i tried to rename the file, aMule must rehash it, and Saved data about total uploaded isn't anymore present...
But without points in filename Copy Feedback works....

Code: [Select]
Feedback from: [DCON] MyTh [X-T HD] (aMule SVN using wxGTK2 v2.8.7 (Snapshot: Wed Apr 30 07:01:48 CEST 2008))

File name: Der Ausbruch des St Helens for maultier-power.avi
File size: 347.26 MB
Share ratio: 0.00%
Transferred: 0 bytes (0 bytes)
Requested: 1 (1)
Accepted: 0 (0)
Complete Sources: 39
Title: Re: Feedback from shared files
Post by: GonoszTopi on May 04, 2008, 01:35:36 PM
Thanks for the report, I'll check it.
Title: Re: Feedback from shared files
Post by: GonoszTopi on May 05, 2008, 02:38:08 AM
Fixed.
Title: Re: Feedback from shared files
Post by: myth on May 05, 2008, 05:00:20 PM
Thank you!  :-*
Title: Re: Feedback from shared files
Post by: xplode_me on May 06, 2008, 06:21:12 PM
Thanks alot :)
Title: Re: Feedback from shared files
Post by: myth on August 09, 2008, 02:02:50 AM
Hi....maybe i'm a bit freaky with feedback report... :P

But i added another nice thing to feedback... :)

Code: [Select]
Feedback from: [b]MY_NICK_NAME (aMule 2.2.2 using wxGTK2 v2.8.7)[/b]
File name: fudshfsda.xyz
File size: 4.69 GB
Share ratio: 50.39%
Uploaded: 11.33 MB ([b]2.36 GB[/b])
Requested: 41 (561)
Accepted: 2 (258)
On Queue: 41
Complete sources: [b]10[/b]

...to see how many ppl are asking this file...

The [ b ][ /b ] code is just for forums to make it easier to find much relevant informations....

And i deleted the free line after "Feedback from: .... " ...because i don't like it :P

If you want to change it in sources here's the change:

In KnownFile.cpp:

Code: [Select]
wxString CKnownFile::GetFeedback() const
{
return   wxString(_("File name")) + wxT(": ") + GetFileName().GetPrintable() + wxT("\n")
+ _("File size") + wxT(": ") + CastItoXBytes(GetFileSize()) + wxT("\n")
+ _("Share ratio") + wxString::Format(wxT(": %.2f%%\n"), (((double)statistic.GetAllTimeTransferred() / (double)GetFileSize()) * 100.0))
+ _("Uploaded") + wxT(": ") + CastItoXBytes(statistic.GetTransferred()) + wxT(" ([b]") + CastItoXBytes(statistic.GetAllTimeTransferred()) + wxT("[/b])\n")
+ _("Requested") + CFormat(wxT(": %u (%u)\n")) % statistic.GetRequests() % statistic.GetAllTimeRequests()
+ _("Accepted") + CFormat(wxT(": %u (%u)\n")) % statistic.GetAccepts() % statistic.GetAllTimeAccepts()
+ _("On Queue") + CFormat(wxT(": %u\n")) % GetQueuedCount() //<-- this one!
+ _("Complete sources") + CFormat(wxT(": [b]%u[/b]\n")) % m_nCompleteSourcesCount;
}
Title: Re: Feedback from shared files
Post by: phoenix on August 11, 2008, 02:51:49 AM
Committed, appart from the [ b ]'s.

Cheers!
Title: Re: Feedback from shared files
Post by: myth on August 11, 2008, 09:13:04 PM
Thank you! :)