upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/35.md
diff options
context:
space:
mode:
Diffstat (limited to '35.md')
-rw-r--r--35.md61
1 files changed, 61 insertions, 0 deletions
diff --git a/35.md b/35.md
new file mode 100644
index 0000000..878e935
--- /dev/null
+++ b/35.md
@@ -0,0 +1,61 @@
1NIP-35
2======
3
4Torrents
5-----------
6
7`draft` `optional`
8
9This NIP defined a new `kind 2003` which is Torrent.
10
11`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.
12
13## Tags
14- `btih`: V1 BitTorrent Info Hash, as seen in the [magnet link](https://www.bittorrent.org/beps/bep_0053.html) `magnet:?xt=urn:btih:HASH`
15- `file`: A file entry inside the torrent, including the full path ie. `info/example.txt`
16
17In order to make torrents searchable by general category, you SHOULD include a few tags like `movie`, `tv`, `HD`, `UHD` etc.
18
19## Tag prefixes
20
21Tag prefixes are used to label the content with references, ie. `["t", "imdb:1234"]`
22
23- `tcat`: A comma separated text category path, ie. `["t", "tcat:video,movie,4k"]`, this should also match the `newznab` category in a best effort approach.
24- `newznab`: The category ID from [newznab](https://github.com/Prowlarr/Prowlarr/blob/develop/src/NzbDrone.Core/Indexers/NewznabStandardCategory.cs)
25- `tmdb`: [The movie database](https://www.themoviedb.org/) id.
26- `ttvdb`: [TV database](https://thetvdb.com/) id.
27- `imdb`: [IMDB](https://www.imdb.com/) id.
28- `mal`: [MyAnimeList](https://myanimelist.net/) id.
29- `anilist`: [AniList](https://anilist.co/) id.
30
31A second level prefix should be included where the database supports multiple media types.
32- `tmdb:movie:693134` maps to `themoviedb.org/movie/693134`
33- `ttvdb:movie:290272` maps to `thetvdb.com/movies/dune-part-two`
34- `mal:anime:9253` maps to `myanimelist.net/anime/9253`
35- `mal:manga:17517` maps to `myanimelist.net/manga/17517`
36
37In 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.
38
39```json
40{
41 "kind": 2003,›
42 "content": "<long-description-pre-formatted>",
43 "tags": [
44 ["title", "<torrent-title>"],
45 ["btih", "<bittorrent-info-hash>"],
46 ["file", "<file-name>", "<file-size-in-bytes>"],
47 ["file", "<file-name>", "<file-size-in-bytes>"],
48 ["t", "tcat:video,movie,4k"],
49 ["t", "newznab:2045"],
50 ["t", "imdb:tt15239678"],
51 ["t", "tmdb:movie:693134"],
52 ["t", "ttvdb:movie:290272"],
53 ["t", "movie"],
54 ["t", "4k"],
55 ]
56}
57```
58
59## Implementations
601. [dtan.xyz](https://git.v0l.io/Kieran/dtan)
612. [nostrudel.ninja](https://github.com/hzrd149/nostrudel/tree/next/src/views/torrents) \ No newline at end of file