Beispiel #1
0
 def GetYoutubePlaylistRPC(self, request, context):
     youtubeprovider = YoutubeProvider()
     try:
         res = youtubeprovider.getPlaylistItems(request)
         return ct_pb2.JsonString(json=res)
     except InvalidPlaylistInfoException as e:
         context.set_code(grpc.StatusCode.INVALID_ARGUMENT)
         context.set_details(e.message)
         return ct_pb2.JsonString()
Beispiel #2
0
 def GetKalturaChannelEntriesRPC(self, request, context):
     kalturaprovider = KalturaProvider()
     try:
         res = kalturaprovider.getPlaylistItems(request)
         return ct_pb2.JsonString(json=res)
     except InvalidPlaylistInfoException as e:
         context.set_code(grpc.StatusCode.INVALID_ARGUMENT)
         context.set_details(e.message)
         return ct_pb2.JsonString()
Beispiel #3
0
 def GetScenesRPC(self, request, context):
     res = scenedetector.find_scenes(request.filePath)
     return ct_pb2.JsonString(json=res)
Beispiel #4
0
 def GetMediaInfoRPC(self, request, context):
     result = LogWorker(f"GetMediaInfo({request.filePath})",
                        lambda: ffmpeg.getMediaInfo(request.filePath))
     return ct_pb2.JsonString(json=result)