Pictures support

This commit is contained in:
Pablo Ferreiro 2023-04-01 15:48:27 +02:00
parent faee8d58f2
commit 33c723d786
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
5 changed files with 40 additions and 21 deletions

View file

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

26
composer.lock generated
View file

@ -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": "97152c7473ad08a262f9db1af867faaa",
"content-hash": "edc1f7ddb80ad13369e0536c32518ece",
"packages": [
{
"name": "bramus/router",
@ -303,16 +303,16 @@
},
{
"name": "pablouser1/tikscraper",
"version": "v2.3.6.1",
"version": "v2.3.6.2",
"source": {
"type": "git",
"url": "https://github.com/pablouser1/TikScraperPHP.git",
"reference": "7e296d1ff871b81ed5f2bc9756308272148cd96f"
"reference": "10394fb5fb5213d05fe0eb29f7582423fc15d08a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/7e296d1ff871b81ed5f2bc9756308272148cd96f",
"reference": "7e296d1ff871b81ed5f2bc9756308272148cd96f",
"url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/10394fb5fb5213d05fe0eb29f7582423fc15d08a",
"reference": "10394fb5fb5213d05fe0eb29f7582423fc15d08a",
"shasum": ""
},
"require": {
@ -346,9 +346,9 @@
"description": "Get data from TikTok API",
"support": {
"issues": "https://github.com/pablouser1/TikScraperPHP/issues",
"source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.3.6.1"
"source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.3.6.2"
},
"time": "2023-03-29T09:18:40+00:00"
"time": "2023-04-01T13:46:50+00:00"
},
{
"name": "php-webdriver/webdriver",
@ -614,16 +614,16 @@
},
{
"name": "symfony/process",
"version": "v5.4.21",
"version": "v5.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd"
"reference": "4b850da0cc3a2a9181c1ed407adbca4733dc839b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd",
"reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd",
"url": "https://api.github.com/repos/symfony/process/zipball/4b850da0cc3a2a9181c1ed407adbca4733dc839b",
"reference": "4b850da0cc3a2a9181c1ed407adbca4733dc839b",
"shasum": ""
},
"require": {
@ -656,7 +656,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v5.4.21"
"source": "https://github.com/symfony/process/tree/v5.4.22"
},
"funding": [
{
@ -672,7 +672,7 @@
"type": "tidelift"
}
],
"time": "2023-02-21T19:46:44+00:00"
"time": "2023-03-06T21:29:33+00:00"
}
],
"packages-dev": [],

View file

@ -0,0 +1,19 @@
{if !isset($item->imagePost)}
<video controls n:attr="autoplay => $isAutoplay" poster="{url_stream($item->video->originCover)}" preload="none">
<source src="{url_stream($item->video->playAddr)}" type="video/mp4" />
</video>
{else}
<div n:class="columns, is-centered, is-vcentered, is-multiline, $isBig ? is-mobile">
{foreach $item->imagePost->images as $image}
{if $isBig}
<div class="column is-half">
{else}
<div class="column is-one-third-tablet is-one-third-desktop is-one-quarter-widescreen is-one-fifth-fullhd">
{/if}
<figure class="image">
<img width="{$image->imageWidth}" height="{$image->imageHeight}" src="{$image->imageURL->urlList[0]}" />
</figure>
</div>
{/foreach}
</div>
{/if}

View file

@ -18,11 +18,11 @@
<p>{include './common/tags.latte', challenges: $item->challenges}</p>
{/if}
<p n:ifcontent>{$item->desc}</p>
<p>Song: {$item->music->title}</p>
<audio controls preload="none" src="{$item->music->playUrl}"></audio>
{include './common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount}
<div class="has-text-centered">
<video width="{$item->video->width}" height="{$item->video->height}" controls preload="none" poster="{url_stream($item->video->originCover)}">
<source src="{url_stream($item->video->playAddr)}" type="video/mp4" />
</video>
{include './common/content.latte', item: $item, isAutoplay: false, isBig: false}
</div>
<p class="has-text-centered"><b>Download video</b></p>
{include './common/download.latte', playAddr: $item->video->playAddr, id: $item->id, uniqueId: $item->author->uniqueId}

View file

@ -9,11 +9,9 @@
{/if}
{block content}
<div class="columns is-centered is-vcentered is-gapless">
<div class="columns is-centered is-vcentered">
<div class="column has-text-centered">
<video controls autoplay poster="{url_stream($item->video->originCover)}">
<source src="{url_stream($item->video->playAddr)}" type="video/mp4" />
</video>
{include '../components/themes/common/content.latte', item: $item, isAutoplay: true, isBig: true}
</div>
<div class="column">
<div class="box">
@ -36,6 +34,8 @@
{/if}
<div class="content">
<p n:ifcontent>{$item->desc}</p>
<p>Song: {$item->music->title}</p>
<audio controls preload="none" src="{$item->music->playUrl}"></audio>
{include '../components/themes/common/stats.latte', playCount: $item->stats->playCount, diggCount: $item->stats->diggCount, commentCount: $item->stats->commentCount, shareCount: $item->stats->shareCount}
<div class="has-text-centered">
{include '../components/themes/common/share.latte', uniqueId: $info->detail->uniqueId, id: $item->id}