Dhiru Kholia 2017-04-28 23:08:18 +05:30
parent 4f9d9ad92b
commit e970d7e546
2 changed files with 17 additions and 0 deletions

View File

@ -30,6 +30,12 @@ int main(void)
TEST_CLIENT("-BT791\0-", "BitTorrent 7.9.1");
TEST_CLIENT("-BT791B-", "BitTorrent 7.9.1 (Beta)");
/* Xfplay 9.9.92 to 9.9.94 uses "-XF9992-" */
TEST_CLIENT("-XF9992-", "Xfplay 9.9.92");
/* Older Xfplay versions have three digit version number */
TEST_CLIENT("-XF9990-", "Xfplay 9.9.9");
/* gobbledygook */
TEST_CLIENT("-IIO\x10\x2D\x04-", "-IIO%10-%04-");
TEST_CLIENT("-I\05O\x08\x03\x01-", "-I%05O%08%03%01-");

View File

@ -587,6 +587,17 @@ char* tr_clientForId(char* buf, size_t buflen, void const* id_in)
{
tr_snprintf(buf, buflen, "MediaGet %d.%02d", charint(id[3]), charint(id[4]));
}
else if (strncmp(chid + 1, "XF", 2) == 0)
{
if (chid[6] == '0')
{
three_digits(buf, buflen, "Xfplay", id + 3);
}
else
{
tr_snprintf(buf, buflen, "Xfplay %d.%d.%d", strint(id + 3, 1), strint(id + 4, 1), strint(id + 5, 2));
}
}
if (*buf)
{