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

Naming options alters basename of the target #2

Closed
nijet99 opened this issue Jan 3, 2010 · 3 comments
Closed

Naming options alters basename of the target #2

nijet99 opened this issue Jan 3, 2010 · 3 comments

Comments

@nijet99
Copy link

nijet99 commented Jan 3, 2010

Hello there

I have the problem that the -n option alters the basename of the target.

Situation:

  • I have a folder like "MyTorrent" and inside there are the actual files
  • I want to create the .torrent file using following options:
    mktorrent -n "MyTorrent unzipped" -a "http://tracker.domain.com" -o "/media/torrent_files/" "MyTorrent"

Because I add the "unzipped" to the naming, then the torrent folder contained in the .torrent file will be changed to "MyTorrent unzipped". That means after creating the .torrent file I would have to rename the "MyTorrent" folder, otherwise the data within can't be used.

The mktorrent help states this:

-n : set the name of the torrent,
default is the basename of the target

In my opinion, it should just alter the name displayed in the torrent client to "MyTorrent unzipped" but not the actual folder.

--> I'm currently using v1.0 from sourceforge.

@tobbez
Copy link

tobbez commented Jan 11, 2010

This seems to be an invalid issue to me.

The BitTorrent specification (BEP3[1]) specifies that "The name key maps to a UTF-8 encoded string which is the suggested name to save the file (or directory) as. It is purely advisory.", which means that mktorrent's current behavior is correct.

[1] http://www.bittorrent.org/beps/bep_0003.html#metainfo-files-are-bencoded-dictionaries-with-the-following-keys

@nijet99
Copy link
Author

nijet99 commented Jan 11, 2010

As it's purely advisory - as you point out - it meas that it can be changed without breaking the standards... at least that's how I read it.

@esmil
Copy link
Collaborator

esmil commented Jan 14, 2010

Hi, sorry for the late reply.

toppez is right though. When creating a .torrent file from a directory, the only place the directory name is saved, is in the name field. That is unless you change it, as you do in the example above.

As tobbez quoted "The name key maps to a UTF-8 encoded string which is the suggested name to save the file (or directory) as. It is purely advisory." Here "purely advisory" means your client can chose to save the contents of the torrent in any directory it wants, but it is advised to save it in a new directory named after the name key.

If you just want to create a .torrent file with a different name, you can use:
mktorrent -a "http://tracker.domain.com" -o "/media/torrent_files/MyTorrent unzipped.torrent" MyTorrent

/Esmil

esmil pushed a commit that referenced this issue May 26, 2016
Revert "Make announce trackers optional"
This issue 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

No branches or pull requests

3 participants