|
1 | 1 | package com.lckp.jproxy.task; |
2 | 2 |
|
3 | | -import java.text.SimpleDateFormat; |
4 | | -import java.time.ZoneId; |
5 | | -import java.util.Calendar; |
6 | | -import java.util.HashMap; |
7 | | -import java.util.List; |
8 | | -import java.util.Map; |
9 | | -import java.util.TimeZone; |
10 | | -import java.util.concurrent.ConcurrentHashMap; |
11 | | -import java.util.regex.Matcher; |
12 | | -import java.util.regex.Pattern; |
13 | | - |
| 3 | +import com.alibaba.fastjson2.JSON; |
| 4 | +import com.alibaba.fastjson2.JSONArray; |
| 5 | +import com.alibaba.fastjson2.JSONObject; |
| 6 | +import com.lckp.jproxy.constant.*; |
| 7 | +import com.lckp.jproxy.entity.SonarrRule; |
| 8 | +import com.lckp.jproxy.service.*; |
| 9 | +import lombok.RequiredArgsConstructor; |
| 10 | +import lombok.extern.slf4j.Slf4j; |
14 | 11 | import org.apache.commons.lang3.StringUtils; |
15 | 12 | import org.springframework.beans.factory.annotation.Value; |
16 | 13 | import org.springframework.scheduling.annotation.EnableScheduling; |
17 | 14 | import org.springframework.scheduling.annotation.Scheduled; |
18 | 15 | import org.springframework.stereotype.Component; |
19 | 16 | import org.springframework.web.client.RestTemplate; |
20 | 17 |
|
21 | | -import com.alibaba.fastjson2.JSON; |
22 | | -import com.alibaba.fastjson2.JSONArray; |
23 | | -import com.alibaba.fastjson2.JSONObject; |
24 | | -import com.lckp.jproxy.constant.ApiField; |
25 | | -import com.lckp.jproxy.constant.Common; |
26 | | -import com.lckp.jproxy.constant.Downloader; |
27 | | -import com.lckp.jproxy.constant.Messages; |
28 | | -import com.lckp.jproxy.constant.SystemConfigKey; |
29 | | -import com.lckp.jproxy.constant.Token; |
30 | | -import com.lckp.jproxy.entity.SonarrRule; |
31 | | -import com.lckp.jproxy.service.IQbittorrentService; |
32 | | -import com.lckp.jproxy.service.ISonarrRuleService; |
33 | | -import com.lckp.jproxy.service.ISonarrTitleService; |
34 | | -import com.lckp.jproxy.service.ISystemConfigService; |
35 | | -import com.lckp.jproxy.service.ITransmissionService; |
36 | | - |
37 | | -import lombok.RequiredArgsConstructor; |
38 | | -import lombok.extern.slf4j.Slf4j; |
| 18 | +import java.text.SimpleDateFormat; |
| 19 | +import java.time.ZoneId; |
| 20 | +import java.util.*; |
| 21 | +import java.util.concurrent.ConcurrentHashMap; |
| 22 | +import java.util.regex.Matcher; |
| 23 | +import java.util.regex.Pattern; |
39 | 24 |
|
40 | 25 | /** |
41 | 26 | * <p> |
@@ -147,7 +132,7 @@ public synchronized void run() { |
147 | 132 | newFileName = oldFileName; |
148 | 133 | } else { |
149 | 134 | if (extension.matches(Common.SUBTITLE_EXTENSION_REGEX)) { |
150 | | - newFileName = newFileName + "." + subtitleNo++; |
| 135 | + extension = "." + subtitleNo++ + extension; |
151 | 136 | } |
152 | 137 | int index = sourceTitle.indexOf(" ["); |
153 | 138 | newFileName = newFileName |
|
0 commit comments