Files
01.md
02.md
03.md
04.md
05.md
06.md
07.md
08.md
09.md
10.md
11.md
12.md
13.md
14.md
15.md
16.md
17.md
18.md
19.md
20.md
21.md
22.md
23.md
24.md
25.md
26.md
27.md
28.md
29.md
30.md
31.md
32.md
33.md
34.md
35.md
36.md
37.md
38.md
39.md
40.md
42.md
44.md
45.md
46.md
47.md
48.md
49.md
50.md
51.md
52.md
53.md
54.md
55.md
56.md
57.md
58.md
59.md
60.md
61.md
62.md
64.md
65.md
66.md
68.md
69.md
70.md
71.md
72.md
73.md
75.md
78.md
7D.md
84.md
86.md
88.md
89.md
90.md
92.md
94.md
96.md
98.md
99.md
BREAKING.md
C0.md
C7.md
README.md
nips/35.md
2024-09-03 20:41:31 +03:30

2.8 KiB

NIP-35

Torrents

draft optional

This NIP defined a new kind 2003 which is a Torrent.

kind 2003 is a simple torrent index where there is enough information to search for content and construct the magnet link. No torrent files exist on nostr.

Tags

  • x: V1 BitTorrent Info Hash, as seen in the magnet link magnet:?xt=urn:btih:HASH
  • file: A file entry inside the torrent, including the full path ie. info/example.txt
  • tracker: (Optional) A tracker to use for this torrent

In order to make torrents searchable by general category, you SHOULD include a few tags like movie, tv, HD, UHD etc.

Tag prefixes

Tag prefixes are used to label the content with references, ie. ["i", "imdb:1234"]

  • tcat: A comma separated text category path, ie. ["i", "tcat:video,movie,4k"], this should also match the newznab category in a best effort approach.
  • newznab: The category ID from newznab
  • tmdb: The movie database id.
  • ttvdb: TV database id.
  • imdb: IMDB id.
  • mal: MyAnimeList id.
  • anilist: AniList id.

A second level prefix should be included where the database supports multiple media types.

  • tmdb:movie:693134 maps to themoviedb.org/movie/693134
  • ttvdb:movie:290272 maps to thetvdb.com/movies/dune-part-two
  • mal:anime:9253 maps to myanimelist.net/anime/9253
  • mal:manga:17517 maps to myanimelist.net/manga/17517

In some cases the url mapping isnt direct, mapping the url in general is out of scope for this NIP, the section above is only a guide so that implementers have enough information to succsesfully map the url if they wish.

{
  "kind": 2003,
  "content": "<long-description-pre-formatted>",
  "tags": [
    ["title", "<torrent-title>"],
    ["x", "<bittorrent-info-hash>"],
    ["file", "<file-name>", "<file-size-in-bytes>"],
    ["file", "<file-name>", "<file-size-in-bytes>"],
    ["tracker", "udp://mytacker.com:1337"],
    ["tracker", "http://1337-tracker.net/announce"],
    ["i", "tcat:video,movie,4k"],
    ["i", "newznab:2045"],
    ["i", "imdb:tt15239678"],
    ["i", "tmdb:movie:693134"],
    ["i", "ttvdb:movie:290272"],
    ["t", "movie"],
    ["t", "4k"],
  ]
}

Torrent Comments

A torrent comment is a kind 2004 event which is used to reply to a torrent event.

This event works exactly like a kind 1 and should follow NIP-10 for tagging.

Implementations

  1. dtan.xyz
  2. nostrudel.ninja