Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some feature requests #7

Closed
wants to merge 2 commits into from

Conversation

Hellowlol
Copy link
Contributor

@Hellowlol Hellowlol commented Sep 22, 2016

So this is most of the feature requests I have listed in #5

Is currently missing:

  • add upload torrent to torrent cache to the torrent class or util
  • md5 check sum.

Dunno if i want to add that anyway.

I have fixed all tests that was broke on windows but i havnt tried it on linux, hence the pr so travis can test it.

It still needs some clean up so i use the same docstring and comments etc, adding a test for the cli and fixing cli for windows. Im not sure how to fix it. I havnt released anything on pypi but i assume we are missing a entry point for the cli. And what ever comments you might have

I dont except the pr to be merged, but let me know what you think.

Coveralls drops since it tests the pypi package now not the pr.

@coveralls
Copy link

coveralls commented Sep 22, 2016

Coverage Status

Coverage decreased (-24.8%) to 73.492% when pulling 625d357 on Hellowlol:better_plx into 5d68000 on idlesign:master.

@coveralls
Copy link

coveralls commented Sep 22, 2016

Coverage Status

Coverage decreased (-24.8%) to 73.492% when pulling 88e744e on Hellowlol:better_plx into 5d68000 on idlesign:master.

Copy link
Owner

@idlesign idlesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the initiative.
I've made some notes.

else:
str_type = basestring
byte_types = bytes
chr_ = lambda ch: ch
int_types = (int, long)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one will be merged in #4.

@@ -0,0 +1,444 @@
from os.path import join, isdir, getsize, normpath, basename, getsize
Copy link
Owner

@idlesign idlesign Sep 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new file - hard to see was have changed, and what is new.
Classic approach is to make several braches (based on one another is they are connected) with gradual improvements introduction.


_filepath = None

def __init__(self,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To many params for the initializer.

Copy link
Contributor Author

@Hellowlol Hellowlol Sep 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Id still like to keep the "settings" and remove

webseeds=None,
httpseeds=None,
private=None,
announce_list=None,
comment=None,
creation_date=None,
created_by=None

thoughts?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Common approach is to encapsulate settings in some settings object, and pass that object, yet, here I hardy can see any reasons for a separate object, since most of settings do belong solely to size calculation.


return target_files_, total_size

def _calc_size(self, size):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Size calculation is discussed in #5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to keep what we have now except from the blocksize ill change that to 32kb and add hardcoded limits. torrentool will use this by default unless some of the options is set.

return self._set_announce_urls(val)

@property
def httpseed(self):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature is ok.

return 'magnet:?xt=urn:btih:' + self.info_hash

@property
def webseed(self):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature is ok.

@Hellowlol Hellowlol closed this Sep 24, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants