1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-30 19:03:04 +00:00
transmission/libtransmission
Charles Kerr f59118d1fe
feat: add torrent-get 'primary-mime-type' to RPC. (#1464)
* feat: add torrent-get 'primary-mime-type' to RPC.

This is a cheap way for RPC clients to know what type of content is in a
torrent. This info can be used to display the torrent, e.g. by using an
icon that corresponds to the mime type.

* use size_t for content byte count

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* explicit boolean expressions

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* use uint64_t for content byte counts

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* avoid unnecessary logic branches

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* explicit cast

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* refactor: add an autogenerated mime-type.h header

* chore: maybe fix the win32 FTBFS

* chore: add mime-types.[ch] to xcode

* Squashed commit of the following:

commit 4c7153fa48
Author: Mike Gelfand <mikedld@users.noreply.github.com>
Date:   Tue Oct 13 03:15:19 2020 +0300

    Remove autotools-based build system (#1465)

    * Support .git files (e.g. for worktrees, submodules)
    * Fix symlinks in source tarball, switch to TXZ, adjust non-release name
    * Remove autotools stuff

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2020-10-13 10:33:56 -05:00
..
announcer-common.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
announcer-http.c refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
announcer-udp.c Fix more coverity warnings (#1445) 2020-09-12 08:17:18 -05:00
announcer.c fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
announcer.h chore: remove unused methods (#1207) 2020-05-11 17:20:46 -05:00
bandwidth.c Uppercase the literal suffixes 2019-03-17 07:07:48 +03:00
bandwidth.h Uppercase the literal suffixes 2019-03-17 07:07:48 +03:00
bitfield.c fix: Coverity warnings (#1443) 2020-09-10 18:50:46 -05:00
bitfield.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
blocklist.c Fixup some formatting leftovers 2019-02-16 10:50:37 +03:00
blocklist.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
cache.c
cache.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
clients.c Cleanup duplicates in clients.c (#991) 2019-10-21 08:20:40 -05:00
clients.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
CMakeLists.txt feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
completion.c Use explicit boolean conversions 2019-07-14 16:25:07 +03:00
completion.h
ConvertUTF.c
ConvertUTF.h
crypto-utils-cyassl.c Switch from UNUSED macro to TR_UNUSED macro 2020-08-18 14:19:55 +03:00
crypto-utils-fallback.c Make use of TR_UNUSED macro where cast-to-void was used before 2020-08-18 14:34:49 +03:00
crypto-utils-openssl.c refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
crypto-utils-polarssl.c Switch from UNUSED macro to TR_UNUSED macro 2020-08-18 14:19:55 +03:00
crypto-utils.c crypto-utils: do tr_rand_int without abs (#1198) 2020-05-11 20:34:03 -05:00
crypto-utils.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
crypto.c
crypto.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
error-types.h
error.c chore: remove unused methods (#1207) 2020-05-11 17:20:46 -05:00
error.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
fdlimit.c fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
fdlimit.h
file-posix.c Make use of TR_UNUSED macro where cast-to-void was used before 2020-08-18 14:34:49 +03:00
file-win32.c Make use of TR_UNUSED macro where cast-to-void was used before 2020-08-18 14:34:49 +03:00
file.c Attempt to explain something to Coverity 2019-03-13 05:32:35 +03:00
file.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
handshake.c chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
handshake.h chore: remove unused methods (#1207) 2020-05-11 17:20:46 -05:00
history.c
history.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
inout.c
inout.h
jsonsl.c chore: update jsonsl parser snapshot (#1050) 2019-11-09 18:06:36 -06:00
jsonsl.h chore: update jsonsl parser snapshot (#1050) 2019-11-09 18:06:36 -06:00
libt.dox
list.c Use explicit boolean conversions 2019-07-14 16:25:07 +03:00
list.h
log.c chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
log.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
magnet.c fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
magnet.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
makemeta.c fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
makemeta.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
metainfo.c refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
metainfo.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
mime-types.c feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
mime-types.h feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
mime-types.js feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
natpmp.c refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
natpmp_local.h
net.c chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
net.h chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
peer-common.h
peer-io.c chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
peer-io.h chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
peer-mgr.c chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
peer-mgr.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
peer-msgs.c chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
peer-msgs.h Use explicit boolean conversions 2019-07-14 16:25:07 +03:00
peer-socket.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
platform-quota.c Make use of TR_UNUSED macro where cast-to-void was used before 2020-08-18 14:34:49 +03:00
platform-quota.h
platform.c fix: Coverity warnings (#1443) 2020-09-10 18:50:46 -05:00
platform.h
port-forwarding.c chore: fix compiler warnings (#1412) 2020-08-27 18:41:26 -05:00
port-forwarding.h
ptrarray.c fix: Coverity warnings (#1443) 2020-09-10 18:50:46 -05:00
ptrarray.h
quark.c feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
quark.h feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
resume.c refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
resume.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
rpc-server.c fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
rpc-server.h
rpcimpl.c feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
rpcimpl.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
session-id.c
session-id.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
session.c chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
session.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
stats.c Check if log deep is enabled before tr_logAddDeep (#1329) 2020-07-28 12:31:36 -05:00
stats.h
subprocess-posix.c fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
subprocess-win32.c Introduce tr_str_is_empty to relay intent better 2019-07-13 12:00:06 +03:00
subprocess.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
torrent-ctor.c chore: remove extraneous/default class destructors (#1317) 2020-06-15 09:30:29 -05:00
torrent-magnet.c fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
torrent-magnet.h
torrent.c feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
torrent.h feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
tr-assert.c
tr-assert.h
tr-dht.c chore: fix compiler warnings (#1412) 2020-08-27 18:41:26 -05:00
tr-dht.h
tr-getopt.c Use explicit boolean conversions 2019-07-14 16:25:07 +03:00
tr-getopt.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
tr-lpd.c fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
tr-lpd.h chore: fix compiler warnings (#1412) 2020-08-27 18:41:26 -05:00
tr-macros.h chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
tr-udp.c Fix more coverity warnings (#1445) 2020-09-12 08:17:18 -05:00
tr-udp.h
tr-utp.c chore: fix some fixmes (#1449) 2020-09-13 16:43:29 -05:00
tr-utp.h
transmission.h fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
trevent.c Check if log deep is enabled before tr_logAddDeep (#1329) 2020-07-28 12:31:36 -05:00
trevent.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
upnp.c Use explicit boolean conversions 2019-07-14 16:25:07 +03:00
upnp.h
utils.c feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
utils.h feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
variant-benc.c fix: Coverity warnings (#1443) 2020-09-10 18:50:46 -05:00
variant-common.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
variant-json.c fix: Coverity warnings (#1443) 2020-09-10 18:50:46 -05:00
variant.c fix: Coverity warnings (#1443) 2020-09-10 18:50:46 -05:00
variant.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
verify.c Switch from UNUSED macro to TR_UNUSED macro 2020-08-18 14:19:55 +03:00
verify.h
version.h.in
watchdir-common.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
watchdir-generic.c Switch from UNUSED macro to TR_UNUSED macro 2020-08-18 14:19:55 +03:00
watchdir-inotify.c Switch from UNUSED macro to TR_UNUSED macro 2020-08-18 14:19:55 +03:00
watchdir-kqueue.c Switch from UNUSED macro to TR_UNUSED macro 2020-08-18 14:19:55 +03:00
watchdir-win32.c Switch from UNUSED macro to TR_UNUSED macro 2020-08-18 14:19:55 +03:00
watchdir.c chore: fix compiler warnings (#1412) 2020-08-27 18:41:26 -05:00
watchdir.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
web.c Fix more coverity warnings (#1445) 2020-09-12 08:17:18 -05:00
web.h chore: fix compiler warnings (#1412) 2020-08-27 18:41:26 -05:00
webseed.c fix: resolve some lgtm warnings (#1444) 2020-09-11 16:07:45 -05:00
webseed.h
wildmat.c