This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[bug/fea] ktorrent 2.0 import torrent single file & data

Tags: None
(comma "," separated)
rapsys
Registered Member
Posts
71
Karma
0
Hi,

I noticed a small bug (I think) in the import function...

If I import a single file torrent, and I set the data to the dir that contains that file, I get an error...

It should be cool to have ktorrent looks if there is a file named exactly the same in that dir for example
(and check the files with same (or less?) size of the torrent one ?)

That may be cool no ?

The error :
Cannot verify data : Cannot read from /datadir
stoeptegel
Registered Member
Posts
1075
Karma
0

Sat Aug 19, 2006 5:53 pm
But what if there's already a file located there with the a same naming, but was not the file supposed to be?
I think that would be something to avoid, so in my view it's probably safer to let the user make the mistake and choose here.
rapsys
Registered Member
Posts
71
Karma
0

Sat Aug 19, 2006 7:18 pm
why not ask ?
(but I don't realy think mandriva-mime-2.6.4012-2mdv2007.0.i586.rpm should be a different file from the one of the rpm)

A simple popup box with :
[Use that file] [Don't use that file] [Skip all files of that dir] [Skip all files] [Use all files]

That whould be realy usefull...

In fact I have many disk with anime fansub (no more edited) in many disk and that why I whould just to put /mnt/mountpointX to have the finenames found
(I have more disk that 3, so it would realy be usefull for me)
rapsys
Registered Member
Posts
71
Karma
0

Sat Aug 19, 2006 11:04 pm
I noticed an other bug in import function :'(

I imported a torrent with that :
Code: Select all
somedirname\
    somefile_1-5.sfv
    somefile_1.mkv
    somefile_2.mkv
    somefile_3.mkv
    somefile_4.mkv
    somefile_5.mkv

the datadir was :
someotherdirname

And the present files were somefile_*.mkv (no .sfv), the import function didn't found the mkv file (or at least seems to not find them), I choosed to not create them
But when I deleted the torrent, that stupid (to not say other worse words) removed all my precious mkv (sic!)

So plz makes the import function don't remove the files he didn't found, nor created, nor checked !!!
George
Moderator
Posts
5421
Karma
1

Sun Aug 20, 2006 10:50 am
rapsys wrote:I noticed an other bug in import function :'(

I imported a torrent with that :
Code: Select all
somedirname\
    somefile_1-5.sfv
    somefile_1.mkv
    somefile_2.mkv
    somefile_3.mkv
    somefile_4.mkv
    somefile_5.mkv

the datadir was :
someotherdirname

And the present files were somefile_*.mkv (no .sfv), the import function didn't found the mkv file (or at least seems to not find them), I choosed to not create them
But when I deleted the torrent, that stupid (to not say other worse words) removed all my precious mkv (sic!)

So plz makes the import function don't remove the files he didn't found, nor created, nor checked !!!


You know, if you remove a torrent and it is not completely downloaded, KT will ask you what you want to do with the incomplete data ...
stoeptegel
Registered Member
Posts
1075
Karma
0

Mon Aug 21, 2006 3:54 am
rapsys wrote:but I don't realy think mandriva-mime-2.6.4012-2mdv2007.0.i586.rpm should be a different file from the one of the rpm


True, but still, that's the main reason for not to do it that way, especially since hashing throws data out of a file immediately when it does not match. I think there is nothing wrong with using such build in safety check, it's even an effective way of checking in my view since the user - who should be more intelligent than a computer, chooses.

I think the idea with [Use that file] [Don't use that file] [Skip all files of that dir] [Skip all files] [Use all files] will make it too bloated and too much of a hassle for just importing a torrent. I mean.. the idea is powerfull, but wouldn't it overdo it for just pointing to one correct file? I think it does. (that could be just me though)

@George
This got me thinking about the auto hashing after positive file detection. An extra dialog to ask whether we want to rehash the data or not might be usefull here. This instead of immediately getting in the procedure of possibly throwing data out of files. Not sure though, just my thought.
George
Moderator
Posts
5421
Karma
1

Mon Aug 21, 2006 4:06 pm
@George
This got me thinking about the auto hashing after positive file detection. An extra dialog to ask whether we want to rehash the data or not might be usefull here. This instead of immediately getting in the procedure of possibly throwing data out of files. Not sure though, just my thought.


Actually no data is thrown out, we just mark that chunk as not downloaded, and download the chunk and then overwrite existing data, so any file should stay working if the content is OK.
rapsys
Registered Member
Posts
71
Karma
0

Mon Aug 21, 2006 7:25 pm
You know, if you remove a torrent and it is not completely downloaded, KT will ask you what you want to do with the incomplete data ...


The problem is that it didn't asked, but removed the not empty files in that case !!!

that's why it's a bug, and a critical one, not find the files is anoying, but delete valid data is critical !!!
George
Moderator
Posts
5421
Karma
1

Tue Aug 22, 2006 4:23 pm
rapsys wrote:
You know, if you remove a torrent and it is not completely downloaded, KT will ask you what you want to do with the incomplete data ...


The problem is that it didn't asked, but removed the not empty files in that case !!!

that's why it's a bug, and a critical one, not find the files is anoying, but delete valid data is critical !!!


Euhm, that can't happen, it allways asks when the data is incomplete, and if doesn't ask, the data is complete, and it doesn't remove any data.
imported4-Ivan
Registered Member
Posts
819
Karma
0

Tue Aug 22, 2006 5:52 pm
I've just come across some very weird behavior that could be related to the problem.

I have a multifile torrent and some 100% completed files. I've tried to deselect one file and message box appeared warning me that data will be lost if I click yes. I clicked 'no' and suddenly 'completed' column showed 0.57% and file was removed from my downloads directory.

This happened both times I've tested it. I'm gonna try and find out what's causing this.
stoeptegel
Registered Member
Posts
1075
Karma
0

Thu Aug 24, 2006 12:04 pm
Ivan wrote:I've just come across some very weird behavior that could be related to the problem.

I have a multifile torrent and some 100% completed files. I've tried to deselect one file and message box appeared warning me that data will be lost if I click yes. I clicked 'no' and suddenly 'completed' column showed 0.57% and file was removed from my downloads directory.

This happened both times I've tested it. I'm gonna try and find out what's causing this.


I had some other problem related to yours here:
http://ktorrent.org/forum/viewtopic.php?t=715
The difference with my was that this was 1) not on a completed file and 2) there was a deselection (by right click) and re-selection needed first.

@George
I will react later on my offtopic, it's hard enough for you doing trillion things at the same time...
rapsys
Registered Member
Posts
71
Karma
0

Mon Aug 28, 2006 3:46 am
I maybe found an explaination on an other torrent...

I dl a torrent which didn't finished (xfs_fsr made crash ktorrent), and then I del it.

then I tried to import the torrent :
/mnt/dl/dir/ktorrent/:
Code: Select all
somename/
   cd1/
      somfine_a.r00
      somfine_a.r01
      somfine_a.r02
      somfine_a.r03
      somfine_a.r04
      ...
      somfine_a.rar
   cd2/
      somfine_b.r00
      somfine_b.r01
      somfine_b.r02
      somfine_b.r03
      somfine_b.r04
      ...
      somfine_b.rar
   cover/
      somefine_f.jpg
      somefine_b.jpg
   somefine.nfo


Instead of using the directory somename that I put in the import directory field, ktorrent stupidly decided to create directory (why the hell ?)

something like that
/mnt/dl/dir/ktorrent/:
somenamecd1/
somenamecd2/
somenamecover/

Why the hell did it that **** stupid things instead of re-use partialy dl content that I didn't renamed at all !!!!
George
Moderator
Posts
5421
Karma
1

Mon Aug 28, 2006 5:02 pm
****, you are right, if there is no / at the end of the data path, this happens.

I guess most people, just don't fill in the path manually, and nobody ever noticed this until you came along.
stoeptegel
Registered Member
Posts
1075
Karma
0

Mon Aug 28, 2006 5:05 pm
With the import plugin and multi file torrents, you have to point to the first folder of the torrent to save to, not the parent. When you don't and chooses the parent (one folder too high), the same torrent gets created inside the torrent data(start folder xyz inside xyz etc.), so nothing should be lost, there should only be double folders and data inside.

EDIT
removed some weirdness thinking here...
George
Moderator
Posts
5421
Karma
1

Mon Aug 28, 2006 5:14 pm
OK, now it is fixed, the fix will be part of the 2.0.2 release (tomorrow)


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft