使用 Zend 检查 Youtube 上的视频是否未列出

发布于 2024-11-01 15:11:48 字数 142 浏览 3 评论 0原文

各位, 我需要知道视频是否通过 Zend Framework 查询未列出。 我知道有读取方法 isVideoPrivate() 和写入方法 setVideoPublic() 和 setVideoPrivate() 但找不到有关未列出状态的任何信息。 你能帮助我吗? 谢谢

Dear all,
I need to know if a video is unlisted through a Zend Framework query.
I know there is the read method isVideoPrivate() and the write methods setVideoPublic() and setVideoPrivate() but can't find anything about the unlisted state.
Can you help me?
thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

同展鸳鸯锦 2024-11-08 15:11:48

我也有同样的烦恼。
但是,我可以通过如下方式区分“公开”或“未公开”。

$videostatus = $videoEntry->extensionElements[6]->extensionAttributes[permission][value];

if($videostatus == 'allowed'){
    $videostatus = 'public';
}elseif($videostatus == 'denied'){
    $videostatus = 'unlisted';
}

I was troubled at the same point,too.
But, I was able to distinguish "public" or "unlisted" by writing as follows.

$videostatus = $videoEntry->extensionElements[6]->extensionAttributes[permission][value];

if($videostatus == 'allowed'){
    $videostatus = 'public';
}elseif($videostatus == 'denied'){
    $videostatus = 'unlisted';
}
感悟人生的甜 2024-11-08 15:11:48

也许是这样的?

try {
        //do stuff with the video
    }
    catch(Zend_Gdata_App_Exception $e) {
        next;
    }
    catch(Zend_Gdata_App_HttpException $httpException) {
        next;
    }
}

Maybe something like this?

try {
        //do stuff with the video
    }
    catch(Zend_Gdata_App_Exception $e) {
        next;
    }
    catch(Zend_Gdata_App_HttpException $httpException) {
        next;
    }
}
梦中的蝴蝶 2024-11-08 15:11:48

也许可以尝试类似的方法;

$permission = $video->extensionElements[5]->extensionAttributes['permission']['value'];
if ($permission == 'denied') {
    $state = 'unlisted';
} else if ($permission == 'allowed' || is_null($permission)) {
    $state = 'public';
}

如果您在索引 5 更改为 6 上没有获得正确的数据,

maybe try something like that

$permission = $video->extensionElements[5]->extensionAttributes['permission']['value'];
if ($permission == 'denied') {
    $state = 'unlisted';
} else if ($permission == 'allowed' || is_null($permission)) {
    $state = 'public';
}

if you doesn't get the right data on index 5 change to 6;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文