aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-04-01 16:45:30 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-04-01 16:45:30 +0200
commit9f008e64ce401673c878b1098f4db41d66d1c56a (patch)
treed0f54e1ce8f052c81905ca53bb1ee3b6d4714236
parentf01369628016ba3038cccac77ba54bcd6be6630b (diff)
downloadjnfilter-9f008e64ce401673c878b1098f4db41d66d1c56a.tar.gz
jnfilter-9f008e64ce401673c878b1098f4db41d66d1c56a.tar.bz2
jnfilter-9f008e64ce401673c878b1098f4db41d66d1c56a.zip
feat: Add option to change feed's metadatav1.0.0
-rw-r--r--main.go3
-rw-r--r--static/index.html29
2 files changed, 30 insertions, 2 deletions
diff --git a/main.go b/main.go
index 728d32c..f6a2a13 100644
--- a/main.go
+++ b/main.go
@@ -254,7 +254,8 @@ func podcast(w http.ResponseWriter, r *http.Request) error {
}
series := getSeries(r)
- filterdXML, err := filterBySeries(series, xml, true)
+ temper := r.URL.Query().Get("tag") == "true"
+ filterdXML, err := filterBySeries(series, xml, temper)
if err != nil {
return err
}
diff --git a/static/index.html b/static/index.html
index 25341fe..266aff6 100644
--- a/static/index.html
+++ b/static/index.html
@@ -108,7 +108,7 @@ a {
}
main {
- width: 40%;
+ width: 50%;
margin: 0 auto;
}
@@ -181,6 +181,18 @@ main {
<div class="section">
<input class="form-ctl" type="checkbox" onchange="updateList(this)" id="parceiro" /><a>Papo de Parceiro</a>
</div>
+ <hr/>
+ <div class="section">
+ <input class="form-ctl" type="checkbox" onchange="updateTag(this)" />
+ <a>Mudar metadata</a>
+ </div>
+ <div class="section">
+ <p> Caso você use um agregador que gerencie o feed para você
+ (como pocketcast), talvez você precise habilitar esta opção para
+ mudar o metadata do feed, fazendo assim com que ele seja
+ reconhecido como um feed único.
+ </p>
+ </div>
<div class="section">
<a id="feedUrl" href="https://jnfilter.gabrielgio.me?q=mamicas" type="textbox">https://jnfilter.gabrielgio.me</a>
</div>
@@ -188,6 +200,7 @@ main {
<script>
var feedUrl = document.getElementById("feedUrl")
var fields = new Set()
+var tag = false
function updateFeedUrl() {
if (fields.size == 0) {
@@ -195,6 +208,15 @@ function updateFeedUrl() {
} else {
url = "https://jnfilter.gabrielgio.me?q="+[...fields].join(',')
}
+
+ if (tag) {
+ if (fields.size == 0) {
+ url += "?tag=true"
+ } else {
+ url += "&tag=true"
+ }
+ }
+
feedUrl.textContent = url
feedUrl.href = url
}
@@ -207,6 +229,11 @@ function updateList(elem) {
}
updateFeedUrl()
}
+
+function updateTag(elem) {
+ tag = elem.checked
+ updateFeedUrl()
+}
</script>
</body>
</html>