RSS TextExtra and Gallery support

This commit is contained in:
Pablo Ferreiro 2023-04-27 20:22:55 +02:00
parent b5d034437f
commit e43580f3f9
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
4 changed files with 24 additions and 19 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "pablouser1/proxitok", "name": "pablouser1/proxitok",
"description": "An alternative frontend for TikTok", "description": "An alternative frontend for TikTok",
"version": "2.4.9.0", "version": "2.4.9.1",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"type": "project", "type": "project",
"authors": [ "authors": [

2
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "d8e56c687ca265b350f34789ce3cf82b", "content-hash": "790ea9098323ef66c520cfe44b92b7d3",
"packages": [ "packages": [
{ {
"name": "bramus/router", "name": "bramus/router",

View file

@ -2,6 +2,11 @@
<video controls n:attr="autoplay => $isAutoplay" poster="{url_stream($item->video->originCover)}" preload="none"> <video controls n:attr="autoplay => $isAutoplay" poster="{url_stream($item->video->originCover)}" preload="none">
<source src="{url_stream($item->video->playAddr)}" type="video/mp4" /> <source src="{url_stream($item->video->playAddr)}" type="video/mp4" />
</video> </video>
{else}
{if isset($isSimple)}
{foreach $item->imagePost->images as $i => $image}
<img src="{url_stream($image->imageURL->urlList[0])}" />
{/foreach}
{else} {else}
<section class="carousel" aria-label="carousel" Tabindex="0"> <section class="carousel" aria-label="carousel" Tabindex="0">
<div class="slides"> <div class="slides">
@ -19,3 +24,4 @@
<div class="carousel__skip-message" id="skip-link" tabindex="0"></div> <div class="carousel__skip-message" id="skip-link" tabindex="0"></div>
</section> </section>
{/if} {/if}
{/if}

View file

@ -1,4 +1,3 @@
{contentType application/rss+xml}
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
@ -9,7 +8,7 @@
{foreach $items as $item} {foreach $items as $item}
<item> <item>
<title>{$item->desc}</title> <title>{$item->desc}</title>
<description><![CDATA[<p>{$item->desc}</p><video controls="controls" preload="auto" src="{url_stream($item->video->playAddr)}"></video>]]></description> <description><![CDATA[<p n:ifcontent>{render_desc($item->desc, $item->textExtra ?? [])|noescape}</p>{include '../components/themes/common/content.latte', item: $item, isAutoplay: false, isSimple: true}]]></description>
<link>{url_video_internal($item->author->uniqueId, $item->id)}</link> <link>{url_video_internal($item->author->uniqueId, $item->id)}</link>
<pubDate>{date('r', $item->createTime)}</pubDate> <pubDate>{date('r', $item->createTime)}</pubDate>
<guid isPermaLink="false">{$item->id}</guid> <guid isPermaLink="false">{$item->id}</guid>