""" Social Media Constants 소셜 미디어 플랫폼 관련 상수 및 Enum을 정의합니다. """ from enum import Enum class SocialPlatform(str, Enum): """지원하는 소셜 미디어 플랫폼""" YOUTUBE = "youtube" INSTAGRAM = "instagram" FACEBOOK = "facebook" TIKTOK = "tiktok" class UploadStatus(str, Enum): """업로드 상태""" PENDING = "pending" # 업로드 대기 중 UPLOADING = "uploading" # 업로드 진행 중 PROCESSING = "processing" # 플랫폼에서 처리 중 (인코딩 등) COMPLETED = "completed" # 업로드 완료 FAILED = "failed" # 업로드 실패 CANCELLED = "cancelled" # 취소됨 class PrivacyStatus(str, Enum): """영상 공개 상태""" PUBLIC = "public" # 전체 공개 UNLISTED = "unlisted" # 일부 공개 (링크 있는 사람만) PRIVATE = "private" # 비공개 # ============================================================================= # 플랫폼별 설정 # ============================================================================= PLATFORM_CONFIG = { SocialPlatform.YOUTUBE: { "name": "YouTube", "display_name": "유튜브", "max_file_size_mb": 256000, # 256GB "supported_formats": ["mp4", "mov", "avi", "wmv", "flv", "3gp", "webm"], "max_title_length": 100, "max_description_length": 5000, "max_tags": 500, "supported_privacy": ["public", "unlisted", "private"], "requires_channel": True, }, SocialPlatform.INSTAGRAM: { "name": "Instagram", "display_name": "인스타그램", "max_file_size_mb": 4096, # 4GB (Reels) "supported_formats": ["mp4", "mov"], "max_duration_seconds": 90, # Reels 최대 90초 "min_duration_seconds": 3, "aspect_ratios": ["9:16", "1:1", "4:5"], "max_caption_length": 2200, "requires_business_account": True, }, SocialPlatform.FACEBOOK: { "name": "Facebook", "display_name": "페이스북", "max_file_size_mb": 10240, # 10GB "supported_formats": ["mp4", "mov"], "max_duration_seconds": 14400, # 4시간 "max_title_length": 255, "max_description_length": 5000, "requires_page": True, }, SocialPlatform.TIKTOK: { "name": "TikTok", "display_name": "틱톡", "max_file_size_mb": 4096, # 4GB "supported_formats": ["mp4", "mov", "webm"], "max_duration_seconds": 600, # 10분 "min_duration_seconds": 1, "max_title_length": 150, "requires_business_account": True, }, } # ============================================================================= # YouTube OAuth Scopes # ============================================================================= YOUTUBE_SCOPES = [ "https://www.googleapis.com/auth/youtube.upload", # 영상 업로드 "https://www.googleapis.com/auth/youtube.readonly", # 채널 정보 읽기 "https://www.googleapis.com/auth/userinfo.profile", # 사용자 프로필 ] YOUTUBE_SEO_HASH = "SEO_Describtion_YT" # ============================================================================= # Instagram/Facebook OAuth Scopes (추후 구현) # ============================================================================= # INSTAGRAM_SCOPES = [ # "instagram_basic", # "instagram_content_publish", # "pages_read_engagement", # "business_management", # ] # FACEBOOK_SCOPES = [ # "pages_manage_posts", # "pages_read_engagement", # "publish_video", # "pages_show_list", # ] # ============================================================================= # TikTok OAuth Scopes (추후 구현) # ============================================================================= # TIKTOK_SCOPES = [ # "user.info.basic", # "video.upload", # "video.publish", # ]