From 81d4374a3f14038c2843a28bbb3abd7c30624a3d Mon Sep 17 00:00:00 2001 From: Xilin Jia <6257601+XilinJia@users.noreply.github.com> Date: Fri, 2 Aug 2024 10:01:47 +0100 Subject: [PATCH] 6.3.1 commit --- .directory | 5 +---- app/build.gradle | 4 ++-- .../ac/mdiq/podcini/storage/database/Feeds.kt | 16 ++++++++-------- .../ui/actions/actionbutton/PlayActionButton.kt | 11 ++++++----- .../podcini/ui/activity/BugReportActivity.kt | 4 +--- .../ac/mdiq/podcini/ui/fragment/QueueFragment.kt | 4 ++-- changelog.md | 5 +++++ .../android/en-US/changelogs/3020225.txt | 5 +++++ 8 files changed, 30 insertions(+), 24 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/3020225.txt diff --git a/.directory b/.directory index f9b3623b..632a998b 100644 --- a/.directory +++ b/.directory @@ -1,7 +1,4 @@ [Dolphin] -Timestamp=2024,2,5,7,26,48.63 +Timestamp=2024,8,2,9,3,22.216 Version=4 ViewMode=1 - -[Settings] -HiddenFilesShown=true diff --git a/app/build.gradle b/app/build.gradle index 54ffeda6..f1bb2e20 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -31,8 +31,8 @@ android { testApplicationId "ac.mdiq.podcini.tests" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - versionCode 3020224 - versionName "6.3.0" + versionCode 3020225 + versionName "6.3.1" applicationId "ac.mdiq.podcini.R" def commit = "" diff --git a/app/src/main/kotlin/ac/mdiq/podcini/storage/database/Feeds.kt b/app/src/main/kotlin/ac/mdiq/podcini/storage/database/Feeds.kt index ae3c74ca..e3bb1d71 100644 --- a/app/src/main/kotlin/ac/mdiq/podcini/storage/database/Feeds.kt +++ b/app/src/main/kotlin/ac/mdiq/podcini/storage/database/Feeds.kt @@ -312,8 +312,8 @@ object Feeds { addNewFeedsSync(context, newFeed) // Update with default values that are set in database resultFeed = searchFeedByIdentifyingValueOrID(newFeed) - } else persistFeedsSync(savedFeed) -// updateFeedMap() + } else upsertBlk(savedFeed) {} + if (removeUnlistedItems) runBlocking { deleteEpisodes(context, unlistedItems).join() } } catch (e: InterruptedException) { e.printStackTrace() @@ -377,12 +377,12 @@ object Feeds { backupManager.dataChanged() } - private fun persistFeedsSync(vararg feeds: Feed) { - Logd(TAG, "persistFeedsSync called") - for (feed in feeds) { - upsertBlk(feed) {} - } - } +// private fun persistFeedsSync(vararg feeds: Feed) { +// Logd(TAG, "persistFeedsSync called") +// for (feed in feeds) { +// upsertBlk(feed) {} +// } +// } fun persistFeedPreferences(feed: Feed) : Job { Logd(TAG, "persistFeedPreferences called") diff --git a/app/src/main/kotlin/ac/mdiq/podcini/ui/actions/actionbutton/PlayActionButton.kt b/app/src/main/kotlin/ac/mdiq/podcini/ui/actions/actionbutton/PlayActionButton.kt index 34177d59..c3fdb542 100644 --- a/app/src/main/kotlin/ac/mdiq/podcini/ui/actions/actionbutton/PlayActionButton.kt +++ b/app/src/main/kotlin/ac/mdiq/podcini/ui/actions/actionbutton/PlayActionButton.kt @@ -59,11 +59,12 @@ class PlayActionButton(item: Episode) : EpisodeActionButton(item) { Log.i(TAG, "The feedmanager was notified about a missing episode. It will update its database now.") val episode = media.episodeOrFetch() if (episode != null) { - episode.media = media - episode.media?.downloaded = false - episode.media?.fileUrl = null - upsertBlk(episode) {} - EventFlow.postEvent(FlowEvent.EpisodeMediaEvent.removed(episode)) + val episode_ = upsertBlk(episode) { + it.media = media + it.media?.downloaded = false + it.media?.fileUrl = null + } + EventFlow.postEvent(FlowEvent.EpisodeMediaEvent.removed(episode_)) } EventFlow.postEvent(FlowEvent.MessageEvent(context.getString(R.string.error_file_not_found))) } diff --git a/app/src/main/kotlin/ac/mdiq/podcini/ui/activity/BugReportActivity.kt b/app/src/main/kotlin/ac/mdiq/podcini/ui/activity/BugReportActivity.kt index d6e300ce..641deb28 100644 --- a/app/src/main/kotlin/ac/mdiq/podcini/ui/activity/BugReportActivity.kt +++ b/app/src/main/kotlin/ac/mdiq/podcini/ui/activity/BugReportActivity.kt @@ -45,7 +45,6 @@ class BugReportActivity : AppCompatActivity() { val crashFile = CrashReportWriter.file if (crashFile.exists()) stacktrace = IOUtils.toString(FileInputStream(crashFile), Charset.forName("UTF-8")) else Logd(TAG, stacktrace) - } catch (e: IOException) { e.printStackTrace() } @@ -112,8 +111,7 @@ class BugReportActivity : AppCompatActivity() { } catch (e: Exception) { e.printStackTrace() val strResId = R.string.log_file_share_exception - Snackbar.make(binding.root, strResId, Snackbar.LENGTH_LONG) - .show() + Snackbar.make(binding.root, strResId, Snackbar.LENGTH_LONG).show() } } catch (e: IOException) { e.printStackTrace() diff --git a/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/QueueFragment.kt b/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/QueueFragment.kt index d77a6f09..3f18d43b 100644 --- a/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/QueueFragment.kt +++ b/app/src/main/kotlin/ac/mdiq/podcini/ui/fragment/QueueFragment.kt @@ -135,10 +135,10 @@ import java.util.* spinnerAdaptor = ArrayAdapter(requireContext(), android.R.layout.simple_spinner_item, spinnerTexts) spinnerAdaptor.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item) queueSpinner.adapter = spinnerAdaptor - queueSpinner.setSelection(spinnerAdaptor.getPosition(curQueue.name)) + queueSpinner.setSelection(queueNames.indexOf(curQueue.name)) queueSpinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener { override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) { - curQueue = upsertBlk(queues[position]) { it.updated } + curQueue = upsertBlk(queues[position]) { it.update() } toolbar.menu?.findItem(R.id.rename_queue)?.setVisible(curQueue.name != "Default") loadCurQueue(true) } diff --git a/changelog.md b/changelog.md index fdd5d2bf..c72a3590 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +# 6.3.1 + +* fixed crash when playing episode with missing media file +* fixed Queue view not opening the current queue + # 6.3.0 * improved handling of playing next in queue when some items have been removed from the queue diff --git a/fastlane/metadata/android/en-US/changelogs/3020225.txt b/fastlane/metadata/android/en-US/changelogs/3020225.txt new file mode 100644 index 00000000..89f8fa56 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/3020225.txt @@ -0,0 +1,5 @@ + +Version 6.3.1 brings several changes: + +* fixed crash when playing episode with missing media file +* fixed Queue view not opening the current queue