Skip to content

Commit

Permalink
6.11.1 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
XilinJia committed Oct 14, 2024
1 parent 54e9708 commit 5ea458e
Show file tree
Hide file tree
Showing 50 changed files with 1,042 additions and 2,058 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ android {
testApplicationId "ac.mdiq.podcini.tests"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

versionCode 3020270
versionName "6.11.0"
versionCode 3020271
versionName "6.11.1"

applicationId "ac.mdiq.podcini.R"
def commit = ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package de.test.podcini.util.syndication.feedgenerator

import ac.mdiq.podcini.net.feed.parser.FeedHandler
import android.util.Xml
import ac.mdiq.podcini.util.MiscFormatter.formatRfc822Date
import ac.mdiq.podcini.storage.model.Feed
import ac.mdiq.podcini.net.feed.parser.namespace.PodcastIndex
import de.test.podcini.util.syndication.feedgenerator.GeneratorUtil.addPaymentLink
import java.io.IOException
import java.io.OutputStream
Expand Down Expand Up @@ -101,11 +101,11 @@ class Rss2Generator : FeedGenerator {
}
if (fundingList.isNotEmpty()) {
for (funding in fundingList) {
xml.startTag(PodcastIndex.NSTAG, "funding")
xml.attribute(PodcastIndex.NSTAG, "url", funding.url)
xml.startTag(FeedHandler.PodcastIndex.NSTAG, "funding")
xml.attribute(FeedHandler.PodcastIndex.NSTAG, "url", funding.url)
xml.text(funding.content)
addPaymentLink(xml, funding.url, true)
xml.endTag(PodcastIndex.NSTAG, "funding")
xml.endTag(FeedHandler.PodcastIndex.NSTAG, "funding")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class VistaDownloaderImpl private constructor(val builder: OkHttpClient.Builder)

/**
* Get the size of the content that the url is pointing by firing a HEAD request.
*
* @param url an url pointing to the content
* @return the size of the content, in bytes
*/
Expand All @@ -95,9 +94,7 @@ class VistaDownloaderImpl private constructor(val builder: OkHttpClient.Builder)
var requestBody: RequestBody? = null
if (dataToSend != null) requestBody = RequestBody.create("application/json; charset=utf-8".toMediaTypeOrNull(), dataToSend)

val requestBuilder: Builder = Builder()
.method(httpMethod, requestBody).url(url)
.addHeader("User-Agent", USER_AGENT)
val requestBuilder: Builder = Builder().method(httpMethod, requestBody).url(url).addHeader("User-Agent", USER_AGENT)

val cookies = getCookies(url)
if (cookies.isNotEmpty()) requestBuilder.addHeader("Cookie", cookies)
Expand Down Expand Up @@ -142,7 +139,6 @@ class VistaDownloaderImpl private constructor(val builder: OkHttpClient.Builder)

/**
* It's recommended to call exactly once in the entire lifetime of the application.
*
* @param builder if null, default builder will be used
* @return a new instance of [DownloaderImpl]
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ package ac.mdiq.podcini.net.download.service
import android.util.Log
import android.webkit.URLUtil

interface DownloaderFactory {
fun create(request: DownloadRequest): Downloader?
}

class DefaultDownloaderFactory : DownloaderFactory {
override fun create(request: DownloadRequest): Downloader? {
if (!URLUtil.isHttpUrl(request.source) && !URLUtil.isHttpsUrl(request.source)) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,5 @@ class FeedBuilder(val context: Context, val showError: (String?, String)->Unit)
// }
Logd(TAG, "fo.id: ${fo?.id} feed.id: ${feed.id}")
}

}
Loading

0 comments on commit 5ea458e

Please sign in to comment.