mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Compare commits
4 commits
6b9cbd5a16
...
ff5043b31b
Author | SHA1 | Date | |
---|---|---|---|
|
ff5043b31b | ||
|
c44a4ce988 | ||
|
2aedc3e861 | ||
|
7474d46743 |
5 changed files with 269 additions and 248 deletions
|
@ -287,7 +287,6 @@ final class Board extends VKAPIRequestHandler
|
|||
{
|
||||
# start_comment_id ne robit
|
||||
$this->requireUser();
|
||||
$this->willExecuteWriteAction();
|
||||
|
||||
$topic = (new TopicsRepo)->getTopicById($group_id, $topic_id);
|
||||
|
||||
|
@ -321,7 +320,6 @@ final class Board extends VKAPIRequestHandler
|
|||
{
|
||||
# order и extended ничё не делают
|
||||
$this->requireUser();
|
||||
$this->willExecuteWriteAction();
|
||||
|
||||
$arr = [];
|
||||
$club = (new ClubsRepo)->get($group_id);
|
||||
|
@ -330,7 +328,7 @@ final class Board extends VKAPIRequestHandler
|
|||
$arr["count"] = (new TopicsRepo)->getClubTopicsCount($club);
|
||||
$arr["items"] = [];
|
||||
$arr["default_order"] = $order;
|
||||
$arr["can_add_topics"] = $club->canBeModifiedBy($this->getUser()) ? true : $club->isEveryoneCanCreateTopics() ? true : false;
|
||||
$arr["can_add_topics"] = $club->canBeModifiedBy($this->getUser()) ? true : ($club->isEveryoneCanCreateTopics() ? true : false);
|
||||
$arr["profiles"] = [];
|
||||
|
||||
if(empty($topic_ids)) {
|
||||
|
|
|
@ -288,7 +288,6 @@ final class Photos extends VKAPIRequestHandler
|
|||
function getAlbums(int $owner_id, string $album_ids = "", int $offset = 0, int $count = 100, bool $need_system = true, bool $need_covers = true, bool $photo_sizes = false)
|
||||
{
|
||||
$this->requireUser();
|
||||
$this->willExecuteWriteAction();
|
||||
|
||||
$res = [];
|
||||
|
||||
|
@ -360,7 +359,6 @@ final class Photos extends VKAPIRequestHandler
|
|||
function getAlbumsCount(int $user_id = 0, int $group_id = 0)
|
||||
{
|
||||
$this->requireUser();
|
||||
$this->willExecuteWriteAction();
|
||||
|
||||
if($user_id == 0 && $group_id == 0 || $user_id > 0 && $group_id > 0)
|
||||
$this->fail(21, "Select user_id or group_id");
|
||||
|
@ -389,7 +387,6 @@ final class Photos extends VKAPIRequestHandler
|
|||
function getById(string $photos, bool $extended = false, bool $photo_sizes = false)
|
||||
{
|
||||
$this->requireUser();
|
||||
$this->willExecuteWriteAction();
|
||||
|
||||
$phts = explode(",", $photos);
|
||||
$res = [];
|
||||
|
@ -413,7 +410,6 @@ final class Photos extends VKAPIRequestHandler
|
|||
function get(int $owner_id, int $album_id, string $photo_ids = "", bool $extended = false, bool $photo_sizes = false, int $offset = 0, int $count = 10)
|
||||
{
|
||||
$this->requireUser();
|
||||
$this->willExecuteWriteAction();
|
||||
|
||||
$res = [];
|
||||
|
||||
|
@ -632,7 +628,6 @@ final class Photos extends VKAPIRequestHandler
|
|||
function getAll(int $owner_id, bool $extended = false, int $offset = 0, int $count = 100, bool $photo_sizes = false)
|
||||
{
|
||||
$this->requireUser();
|
||||
$this->willExecuteWriteAction();
|
||||
|
||||
if($owner_id < 0)
|
||||
$this->fail(4, "This method doesn't works with clubs");
|
||||
|
@ -661,7 +656,6 @@ final class Photos extends VKAPIRequestHandler
|
|||
function getComments(int $owner_id, int $photo_id, bool $need_likes = false, int $offset = 0, int $count = 100, bool $extended = false, string $fields = "")
|
||||
{
|
||||
$this->requireUser();
|
||||
$this->willExecuteWriteAction();
|
||||
|
||||
$photo = (new PhotosRepo)->getByOwnerAndVID($owner_id, $photo_id);
|
||||
$comms = array_slice(iterator_to_array($photo->getComments(1, $offset + $count)), $offset);
|
||||
|
|
|
@ -13,7 +13,7 @@ Move-Item $file $temp
|
|||
|
||||
# video stub logic was implicitly deprecated, so we start processing at once
|
||||
ffmpeg -i $temp -ss 00:00:01.000 -vframes 1 "$dir$hashT/$hash.gif"
|
||||
ffmpeg -i $temp -c:v libx264 -q:v 7 -c:a libmp3lame -q:a 4 -tune zerolatency -vf "scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2,setsar=1" -y $temp2
|
||||
ffmpeg -i $temp -c:v libx264 -q:v 7 -c:a libmp3lame -q:a 4 -tune zerolatency -vf "scale=480:-1,setsar=1" -y $temp2
|
||||
|
||||
Move-Item $temp2 "$dir$hashT/$hash.mp4"
|
||||
Remove-Item $temp
|
||||
|
|
|
@ -3,7 +3,7 @@ tmpfile="$RANDOM-$(date +%s%N)"
|
|||
cp $2 "/tmp/vid_$tmpfile.bin"
|
||||
|
||||
nice ffmpeg -i "/tmp/vid_$tmpfile.bin" -ss 00:00:01.000 -vframes 1 $3${4:0:2}/$4.gif
|
||||
nice -n 20 ffmpeg -i "/tmp/vid_$tmpfile.bin" -c:v libx264 -q:v 7 -c:a libmp3lame -q:a 4 -tune zerolatency -vf "scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2,setsar=1" -y "/tmp/ffmOi$tmpfile.mp4"
|
||||
nice -n 20 ffmpeg -i "/tmp/vid_$tmpfile.bin" -c:v libx264 -q:v 7 -c:a libmp3lame -q:a 4 -tune zerolatency -vf "scale=480:-1,setsar=1" -y "/tmp/ffmOi$tmpfile.mp4"
|
||||
|
||||
rm -rf $3${4:0:2}/$4.mp4
|
||||
mv "/tmp/ffmOi$tmpfile.mp4" $3${4:0:2}/$4.mp4
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue