Ejemplo n.º 1
0
def video_added(video, event):
    if getattr(video, 'video_file', None):
        if getattr(video, 'upload_video_to_youtube', False):
            uploadToYouTube(video)
        else:
            convertVideoFormats(video)
    if getattr(video, 'youtube_url', None) and getattr(video, 'retrieve_thumb', False):
        # it has youtube_url set if is a remote video or is uploaded to youtube
        retrieveThumbImage(video)
Ejemplo n.º 2
0
def video_added(video, event):
    if getattr(video, 'video_file', None):
        if getattr(video, 'upload_video_to_youtube', False):
            uploadToYouTube(video)
        else:
            convertVideoFormats(video)
    if getattr(video, 'youtube_url', None) and getattr(video, 'retrieve_thumb',
                                                       False):
        # it has youtube_url set if is a remote video or is uploaded to youtube
        retrieveThumbImage(video)
Ejemplo n.º 3
0
def video_edited(video, event):
    if getattr(video, 'youtube_data', False):
        if not getattr(video, 'upload_video_to_youtube', False):
            # previously set to put on youtube, but no longer set to be on youtube
            removeFromYouTube(video)
            convertVideoFormats(video)
        elif video.video_file and not getattr(video, 'video_converted', True):
            # new video set, need to upload
            uploadToYouTube(video)
        elif getattr(video, 'upload_video_to_youtube', False):
            editYouTubeVideo(video)
    else:
        if getattr(video, 'upload_video_to_youtube', False):
            # previously not on youtube, but now is, upload
            uploadToYouTube(video)
        elif video.video_file and not getattr(video, 'video_converted', True):
            convertVideoFormats(video)
Ejemplo n.º 4
0
def video_edited(video, event):
    if getattr(video, 'youtube_url', None) and getattr(video, 'retrieve_thumb',
                                                       False):
        retrieveThumbImage(video)
    elif getattr(video, 'youtube_data', False):
        if not getattr(video, 'upload_video_to_youtube', False):
            # previously set to put on youtube, but no longer set to be on youtube
            removeFromYouTube(video)
            convertVideoFormats(video)
        elif video.video_file and not getattr(video, 'video_converted', True):
            # new video set, need to upload
            uploadToYouTube(video)
        elif getattr(video, 'upload_video_to_youtube', False):
            editYouTubeVideo(video)
    else:
        if getattr(video, 'upload_video_to_youtube', False):
            # previously not on youtube, but now is, upload
            uploadToYouTube(video)
        elif video.video_file and not getattr(video, 'video_converted', True):
            convertVideoFormats(video)
Ejemplo n.º 5
0
def video_added(video, event):
    if video.video_file:
        if getattr(video, 'upload_video_to_youtube', False):
            uploadToYouTube(video)
        else:
            convertVideoFormats(video)