Workaround for back btn. Added id to vid download

This commit is contained in:
Pablo Ferreiro 2022-02-07 18:32:45 +01:00
parent 3772eabd99
commit 19553f8837
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
5 changed files with 13 additions and 9 deletions

View file

@ -20,6 +20,6 @@ jobs:
- name: Create Release - name: Create Release
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1
with: with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{steps.version.outputs.prop}} tag: v${{steps.version.outputs.prop}}
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true allowUpdates: true

View file

@ -25,7 +25,11 @@ class ProxyController {
if (isset($_GET['download'])) { if (isset($_GET['download'])) {
// Download // Download
$downloader = new \Sovit\TikTok\Download(); $downloader = new \Sovit\TikTok\Download();
$downloader->url($url, "tiktok-video", 'mp4'); $filename = 'tiktok-video';
if (isset($_GET['id'])) {
$filename .= '-' . $_GET['id'];
}
$downloader->url($url, $filename, 'mp4');
} else { } else {
// Stream // Stream
$streamer = new \Sovit\TikTok\Stream(); $streamer = new \Sovit\TikTok\Stream();

View file

@ -6,7 +6,7 @@
<div class="column is-one-quarter"> <div class="column is-one-quarter">
<a class="clickable-img" id="{$item->id}" href="#{$item->id}" <a class="clickable-img" id="{$item->id}" href="#{$item->id}"
data-video_url="{path('/stream?url=' . urlencode($item->video->playAddr))}" data-video_url="{path('/stream?url=' . urlencode($item->video->playAddr))}"
data-video_download="{path('/stream?url=' . urlencode($item->video->playAddr) . '&download=1')}" data-video_download="{path('/stream?url=' . urlencode($item->video->playAddr) . '&download=1&id=' . $item->id)}"
data-desc="{$item->desc}" data-desc="{$item->desc}"
data-music_title="{$item->music->title}" data-music_title="{$item->music->title}"
data-music_url="{path('/stream?url=' . urlencode($item->music->playUrl))}"> data-music_url="{path('/stream?url=' . urlencode($item->music->playUrl))}">
@ -18,10 +18,10 @@
</div> </div>
<div n:ifset="$feed->info" class="buttons"> <div n:ifset="$feed->info" class="buttons">
{if isset($_GET['cursor']) && $_GET['cursor'] != 0 } {if isset($_GET['cursor']) && $_GET['cursor'] != 0 }
<a class="button is-danger" href="?cursor=0">First</a> <a class="button is-danger" href="?">First</a>
<a class="button is-danger" href="?cursor={$feed->minCursor}">Back</a> <button class="button is-danger" onclick="history.back()">Back</button>
{/if} {/if}
<a n:attr="disabled => $feed->hasMore" class="button is-success" href="?cursor={$feed->maxCursor}">Next</a> <a n:attr="disabled => !$feed->hasMore" class="button is-success" href="?cursor={$feed->maxCursor}">Next</a>
</div> </div>
</section> </section>

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": "1.4.1", "version": "1.4.1.1",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"type": "project", "type": "project",
"homepage": "https://github.com/pablouser1/ProxiTok", "homepage": "https://github.com/pablouser1/ProxiTok",

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": "b40da817e3b81d14a1ed55aad52cf434", "content-hash": "275eed5df34976f1f82201b8aef4bddd",
"packages": [ "packages": [
{ {
"name": "bramus/router", "name": "bramus/router",