From fd0ee96c0405121c5caf89f6863cb8ffb1648a94 Mon Sep 17 00:00:00 2001 From: lunaticbum Date: Tue, 21 Apr 2026 14:02:33 +0900 Subject: [PATCH] ... --- .../launcher/home/CompletedFilesFragment.kt | 39 +------------------ .../launcher/wall/MyWallpaperService.kt | 2 +- 2 files changed, 3 insertions(+), 38 deletions(-) diff --git a/app/src/main/kotlin/bums/lunatic/launcher/home/CompletedFilesFragment.kt b/app/src/main/kotlin/bums/lunatic/launcher/home/CompletedFilesFragment.kt index 35a3a590..fda1b8e4 100644 --- a/app/src/main/kotlin/bums/lunatic/launcher/home/CompletedFilesFragment.kt +++ b/app/src/main/kotlin/bums/lunatic/launcher/home/CompletedFilesFragment.kt @@ -884,7 +884,7 @@ class CompletedFilesFragment : Fragment() { } // [단계 2] 특수 폴더 정리 및 잔여 파일 trash 이동 - val subtitleExts = setOf("srt", "smi", "ass", "vtt", "txt") + val subtitleExts = setOf("srt", "smi", "ass", "vtt") val protectedDirs = setOf("Images", "Videos", "Documents", "Etc", "trash", "Youtube") rootDir.listFiles()?.filter { it.isDirectory && !protectedDirs.contains(it.name) }?.forEach { folder -> @@ -901,11 +901,9 @@ class CompletedFilesFragment : Fragment() { videoFiles.forEach { videoFile -> if (videoFile.renameTo(File(videoTargetDir, videoFile.name))) { movedCount++ - val videoNameOnly = videoFile.nameWithoutExtension + potentialSubtitles.forEach { subFile -> -// if (subFile.nameWithoutExtension.startsWith(videoNameOnly)) { if (subFile.renameTo(File(videoTargetDir, subFile.name))) movedCount++ -// } } } } @@ -1164,40 +1162,7 @@ class CompletedFilesAdapter( Glide.with(itemView.context).load(file).placeholder(android.R.drawable.ic_menu_report_image).into(ivThumb) } } - var localPlayer: NativePlayer? = null - val textureView = itemView.findViewById(R.id.previewTextureView) - ivThumb?.setOnTouchListener { v, event -> - when (event.action) { - MotionEvent.ACTION_DOWN -> { - // 💡 0.5초 뒤에도 누르고 있다면 재생 시작 - v.postDelayed({ - if (v.isPressed && extVideos.contains(file.extension.lowercase())) { - textureView.visibility = View.VISIBLE - localPlayer = NativePlayer().apply { - initialize() - val pfd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY) - setDataSource(pfd.detachFd(), -1) - onPreparedListener = { - seekTo(60.0) // 1분 지점 - play(Surface(textureView.surfaceTexture)) - } - prepareAsync() - } - } - }, 500) - } - MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> { - // 💡 손을 떼면 즉시 뷰 숨기고 플레이어 파괴 - v.isPressed = false - textureView.visibility = View.GONE - localPlayer?.stop() - localPlayer?.destroy() - localPlayer = null - } - } - true // 이벤트를 소비하여 롱클릭/클릭 충돌 방지 (필요 시 조정) - } itemView.setOnClickListener { onItemClick(file) } itemView.setOnLongClickListener { if (file.name != "..") onItemLongClick(file) diff --git a/app/src/main/kotlin/bums/lunatic/launcher/wall/MyWallpaperService.kt b/app/src/main/kotlin/bums/lunatic/launcher/wall/MyWallpaperService.kt index 3e95e56e..02d1b6e2 100644 --- a/app/src/main/kotlin/bums/lunatic/launcher/wall/MyWallpaperService.kt +++ b/app/src/main/kotlin/bums/lunatic/launcher/wall/MyWallpaperService.kt @@ -327,7 +327,7 @@ class MyWallpaperService : WallpaperService() { } - val requiredSizeRatio = 0.4 + val requiredSizeRatio = 0.5 private fun getVideoSize(file: File): Pair? { val retriever = android.media.MediaMetadataRetriever()