1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-05 22:44:23 +00:00
transmission/libtransmission/metainfo.h
Mike Gelfand bb4741002f Go back to using hash as base name for resume and torrent files
The format introduced in TRAC-394 is nice but brings its own issues (e.g.
TRAC-4189, #122). I'm okay with a bit of grepping myself if it makes the
experience better for end users.

Using hashes results in filenames well under 255 bytes limit on some
filesystems. If even that will not be enough, I'd suggest reporting the
issue elsewhere.

Fixes: #122
2017-07-26 21:32:26 +03:00

32 lines
930 B
C

/*
* This file Copyright (C) 2005-2014 Mnemosyne LLC
*
* It may be used under the GNU GPL versions 2 or 3
* or any future license endorsed by Mnemosyne LLC.
*
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#pragma once
#include "transmission.h"
#include "variant.h"
enum tr_metainfo_basename_format
{
TR_METAINFO_BASENAME_NAME_AND_PARTIAL_HASH,
TR_METAINFO_BASENAME_HASH
};
bool tr_metainfoParse(tr_session const* session, tr_variant const* variant, tr_info* setmeInfo, bool* setmeHasInfoDict,
size_t* setmeInfoDictLength);
void tr_metainfoRemoveSaved(tr_session const* session, tr_info const* info);
char* tr_metainfoGetBasename(tr_info const*, enum tr_metainfo_basename_format format);
void tr_metainfoMigrateFile(tr_session const* session, tr_info const* info, enum tr_metainfo_basename_format old_format,
enum tr_metainfo_basename_format new_format);