Skip to content

Commit

Permalink
Move torrent client to the separate service
Browse files Browse the repository at this point in the history
  • Loading branch information
galushko committed Oct 18, 2023
1 parent 9a55ebc commit 08fb9c2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import lombok.extern.slf4j.Slf4j;
import lombok.val;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
Expand All @@ -25,7 +26,7 @@ public TorrentCommands() {
@Override
protected void executeRequest(SmartJson message) {
long chatId = message.getUserId();
String requestBodyFormat = ResourceReader.readResourceContent(String.format("transmission_requests/%s", message.getText()));
String requestBodyFormat = ResourceReader.readResourceContent(String.format("transmission_requests/%s", message.getText().split(" ")[0]));
String torrentId = message.getValue("ARG");
String requestBody = String.format(requestBodyFormat, torrentId);
log.debug("[executeRequest] Request body:\n{}", requestBody);
Expand Down

0 comments on commit 08fb9c2

Please sign in to comment.