From e43580f3f9b9906b4eb4eec8f60bdb087a7c8ecf Mon Sep 17 00:00:00 2001
From: Pablo Ferreiro
Date: Thu, 27 Apr 2023 20:22:55 +0200
Subject: [PATCH] RSS TextExtra and Gallery support
---
composer.json | 2 +-
composer.lock | 2 +-
.../components/themes/common/content.latte | 36 +++++++++++--------
templates/views/rss.latte | 3 +-
4 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/composer.json b/composer.json
index 54a5a1c..3c5d0a7 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"name": "pablouser1/proxitok",
"description": "An alternative frontend for TikTok",
- "version": "2.4.9.0",
+ "version": "2.4.9.1",
"license": "AGPL-3.0-or-later",
"type": "project",
"authors": [
diff --git a/composer.lock b/composer.lock
index 2e001aa..405d55e 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "d8e56c687ca265b350f34789ce3cf82b",
+ "content-hash": "790ea9098323ef66c520cfe44b92b7d3",
"packages": [
{
"name": "bramus/router",
diff --git a/templates/components/themes/common/content.latte b/templates/components/themes/common/content.latte
index 35a2482..0257da5 100644
--- a/templates/components/themes/common/content.latte
+++ b/templates/components/themes/common/content.latte
@@ -3,19 +3,25 @@
{else}
-
-
- {foreach $item->imagePost->images as $i => $image}
-
-
-
- {/foreach}
-
-
- {for $i = 0; $i < count($item->imagePost->images); $i++}
-
{$i + 1}
- {/for}
-
-
-
+{if isset($isSimple)}
+ {foreach $item->imagePost->images as $i => $image}
+
+ {/foreach}
+{else}
+
+
+ {foreach $item->imagePost->images as $i => $image}
+
+
+
+ {/foreach}
+
+
+ {for $i = 0; $i < count($item->imagePost->images); $i++}
+
{$i + 1}
+ {/for}
+
+
+
+ {/if}
{/if}
diff --git a/templates/views/rss.latte b/templates/views/rss.latte
index bf48f59..bd70d97 100644
--- a/templates/views/rss.latte
+++ b/templates/views/rss.latte
@@ -1,4 +1,3 @@
-{contentType application/rss+xml}
@@ -9,7 +8,7 @@
{foreach $items as $item}
-
{$item->desc}
- {$item->desc}
]]>
+ {render_desc($item->desc, $item->textExtra ?? [])|noescape}{include '../components/themes/common/content.latte', item: $item, isAutoplay: false, isSimple: true}]]>
{url_video_internal($item->author->uniqueId, $item->id)}
{date('r', $item->createTime)}
{$item->id}