File tree 3 files changed +8
-5
lines changed
src/main/kotlin/com/hcyacg
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ plugins {
13
13
}
14
14
15
15
group = " com.hcyacg"
16
- version = " 1.7.4"
16
+ version = " 1.7.4-fix "
17
17
18
18
repositories {
19
19
// mavenLocal()
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ object Pixiv : KotlinPlugin(
32
32
JvmPluginDescription (
33
33
id = "com.hcyacg.pixiv",
34
34
name = "pixiv插画",
35
- version = "1.7.4-future-2 ",
35
+ version = "1.7.4",
36
36
) {
37
37
author("Nekoer ")
38
38
info("""pixiv插画""")
Original file line number Diff line number Diff line change @@ -525,10 +525,13 @@ object SexyCenter {
525
525
}
526
526
try {
527
527
val file = File (Config .localImagePath)
528
- val list = getAllImage(file)
529
528
529
+ val list = getAllImage(file)
530
+ if (list.size == 0 ){
531
+ return
532
+ }
530
533
val num = 0 until list.size
531
-
534
+ println (num)
532
535
val imageFile = File (list[num.random()])
533
536
val input = withContext(Dispatchers .IO ) {
534
537
FileInputStream (imageFile)
@@ -593,7 +596,7 @@ object SexyCenter {
593
596
imageList.addAll(getAllImage(tempFile))
594
597
} else {
595
598
val type = CheckFileTypeUtil .getFileType(tempFile.path)
596
- if (tempFile.endsWith(" .jpg" ) || tempFile.endsWith(" .png" ) || tempFile.endsWith(" .gif" )){
599
+ if (tempFile.path. endsWith(" .jpg" ) || tempFile.path. endsWith(" .png" ) || tempFile.path .endsWith(" .gif" )){
597
600
if (arrayOf(" jpg" ," png" ," gif" ).contains(type)){
598
601
imageList.add(tempFile.path)
599
602
}else {
You can’t perform that action at this time.
0 commit comments