コード例 #1
0
ファイル: rsbackend.py プロジェクト: zenogantner/anki
 def open_collection(self, col_path: str, media_folder_path: str,
                     media_db_path: str, log_path: str):
     self._run_command(
         pb.BackendInput(open_collection=pb.OpenCollectionIn(
             collection_path=col_path,
             media_folder_path=media_folder_path,
             media_db_path=media_db_path,
             log_path=log_path,
         )),
         release_gil=True,
     )
コード例 #2
0
 def open_collection(
     self,
     *,
     collection_path: str,
     media_folder_path: str,
     media_db_path: str,
     log_path: str,
 ) -> pb.Empty:
     input = pb.OpenCollectionIn(
         collection_path=collection_path,
         media_folder_path=media_folder_path,
         media_db_path=media_db_path,
         log_path=log_path,
     )
     output = pb.Empty()
     output.ParseFromString(self._run_command(53, input))
     return output