mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-13 19:06:24 +00:00
2.4 KiB
2.4 KiB
NIP-35
Torrents
draft
optional
This NIP defined a new kind 2003
which is 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
btih
: V1 BitTorrent Info Hash, as seen in the magnet linkmagnet:?xt=urn:btih:HASH
file
: A file entry inside the torrent, including the full path ie.info/example.txt
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. ["t", "imdb:1234"]
tcat
: A comma separated text category path, ie.["t", "tcat:video,movie,4k"]
, this should also match thenewznab
category in a best effort approach.newznab
: The category ID from newznabtmdb
: 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 tothemoviedb.org/movie/693134
ttvdb:movie:290272
maps tothetvdb.com/movies/dune-part-two
mal:anime:9253
maps tomyanimelist.net/anime/9253
mal:manga:17517
maps tomyanimelist.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>"],
["btih", "<bittorrent-info-hash>"],
["file", "<file-name>", "<file-size-in-bytes>"],
["file", "<file-name>", "<file-size-in-bytes>"],
["t", "tcat:video,movie,4k"],
["t", "newznab:2045"],
["t", "imdb:tt15239678"],
["t", "tmdb:movie:693134"],
["t", "ttvdb:movie:290272"],
["t", "movie"],
["t", "4k"],
]
}