Skip to content

Commit b10864b

Browse files
committed
v3.4.4 修复重命名时路径嵌套的问题
1 parent ce4a036 commit b10864b

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

changelog.en_US.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
# Change Logs
55

6+
## v3.4.4 2024-06-04
7+
8+
👻 Fix the issue of nested path while renaming
9+
610
## v3.4.3 2024-02-20
711

812
🚀 Optimize radarr title matching logic

changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
# 变更日志
55

6+
## v3.4.4 2024-06-04
7+
8+
👻 修复重命名时路径嵌套的问题
9+
610
## v3.4.3 2024-02-20
711

812
🚀 优化 Radarr 标题匹配逻辑

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<!-- 项目信息 -->
1212
<groupId>com.lckp</groupId>
1313
<artifactId>jproxy</artifactId>
14-
<version>3.4.3</version>
14+
<version>3.4.4</version>
1515
<name>JProxy</name>
1616
<description>介于 Sonarr/Radarr 和 Jackett/Prowlarr 之间的代理,主要用于优化查询和提升识别率</description>
1717
<!-- 依赖版本 -->

src/main/java/com/lckp/jproxy/task/RadarrRenameTask.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ public synchronized void run() {
122122
if (extension.matches(Common.SUBTITLE_EXTENSION_REGEX)) {
123123
newFileName = newFileName + "." + subtitleNo++;
124124
}
125-
newFileName = newFileName + " "
126-
+ sourceTitle.substring(sourceTitle.indexOf("["))
125+
int index = sourceTitle.indexOf(" [");
126+
newFileName = newFileName
127+
+ (index > -1 ? sourceTitle.substring(index) : "")
127128
+ extension;
128129
}
129130
String newFilePath;

src/main/java/com/lckp/jproxy/task/SonarrRenameTask.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ public synchronized void run() {
149149
if (extension.matches(Common.SUBTITLE_EXTENSION_REGEX)) {
150150
newFileName = newFileName + "." + subtitleNo++;
151151
}
152-
newFileName = newFileName + " "
153-
+ sourceTitle.substring(sourceTitle.indexOf("["))
152+
int index = sourceTitle.indexOf(" [");
153+
newFileName = newFileName
154+
+ (index > -1 ? sourceTitle.substring(index) : "")
154155
+ extension;
155156
}
156157
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--liquibase formatted sql logicalFilePath:/database/changelog/v3.4.4.sql
2+
--changeset LuckyPuppy514:1
3+
--comment: 更新净标题正则表达式
4+
UPDATE system_config SET value='(`|,|~|!|@|#|%|&|_|=|''|"|:|<|>|-|—|·|,|~|、|。|‘|’|“|”|?|!|:|(|)|【|】|《|》|♀|/)' WHERE id=16;
5+
--rollback UPDATE system_config SET value='(`|,|~|!|@|#|%|&|_|=|''|"|:|<|>|-|—|·|,|~|、|。|‘|’|“|”|?|!|:|(|)|【|】|《|》|♀)' WHERE id=16;

0 commit comments

Comments
 (0)