로그인정보와 함께 browser_controller에 전달된 toggle_state 딕셔너리의 재초기화로 인한 문제 수정
This commit is contained in:
parent
32863688b1
commit
6b38c58750
|
|
@ -1054,6 +1054,8 @@ class BrowserController(QThread):
|
|||
items_per_page = result.get("items_per_page", 0)
|
||||
self.logger.debug(f"총 상품 수: {total_products}, 페이지당 상품 수: {items_per_page}")
|
||||
|
||||
self.logger.debug(f"[ self.toggle_states 상태 ]\n{self.toggle_states}")
|
||||
|
||||
if total_products == 0:
|
||||
self.logger.debug('수집할 상품이 없습니다. 작업을 종료합니다.')
|
||||
return
|
||||
|
|
@ -1112,41 +1114,41 @@ class BrowserController(QThread):
|
|||
product_category = await self.titleHandler.get_category(market='ss') # 카테고리 가져오기
|
||||
|
||||
# 옵션 수정
|
||||
is_optionTrnas = self.toggle_states.get('optionTrnas', False)
|
||||
is_optionIMGTrans = self.toggle_states.get('optionIMGTrans', False)
|
||||
is_optionAutoSelect = self.toggle_states.get('optionAutoSelect', False)
|
||||
is_optionTrnas = self.toggle_states.get('optionTrnas')
|
||||
is_optionIMGTrans = self.toggle_states.get('optionIMGTrans')
|
||||
is_optionAutoSelect = self.toggle_states.get('optionAutoSelect')
|
||||
|
||||
if is_optionTrnas or is_optionIMGTrans or is_optionAutoSelect:
|
||||
self.logger.debug(f"옵션수정 : optionTrnas={is_optionTrnas} + optionIMGTrans={is_optionIMGTrans} + optionAutoSelect{is_optionAutoSelect}")
|
||||
self.logger.debug(f"옵션수정 : optionTrnas={is_optionTrnas} + optionIMGTrans={is_optionIMGTrans} + optionAutoSelect={is_optionAutoSelect}")
|
||||
await self.edit_option(product_name)
|
||||
|
||||
# 가격 수정
|
||||
is_price = self.toggle_states.get('price', False)
|
||||
is_price = self.toggle_states.get('price')
|
||||
if is_price:
|
||||
self.logger.debug(f"가격수정 : {is_price} ")
|
||||
await self.edit_price(product_category)
|
||||
|
||||
# 썸네일 수정
|
||||
thumb = self.toggle_states.get('thumb',False)
|
||||
thumb = self.toggle_states.get('thumb')
|
||||
if thumb:
|
||||
self.logger.debug(f"썸네일수정 : {thumb} ")
|
||||
await self.edit_thumb()
|
||||
|
||||
# 태그 수정
|
||||
if self.toggle_states.get('tag',False):
|
||||
if self.toggle_states.get('tag'):
|
||||
pass
|
||||
|
||||
# 상품명 수정
|
||||
if self.toggle_states.get('title',False):
|
||||
if self.toggle_states.get('title'):
|
||||
pass
|
||||
|
||||
# 상세페이지 수정
|
||||
detail_Option = self.toggle_states.get('detail_Option',False)
|
||||
detail_IMGTrans = self.toggle_states.get('detail_IMGTrans',False)
|
||||
detail_Option = self.toggle_states.get('detail_Option')
|
||||
detail_IMGTrans = self.toggle_states.get('detail_IMGTrans')
|
||||
if detail_Option or detail_IMGTrans:
|
||||
self.logger.debug(f"상세페이지 수정 : {detail_Option} + {detail_IMGTrans}")
|
||||
|
||||
if not self.toggle_states.get('recovery_mode',False):
|
||||
if not self.toggle_states.get('recovery_mode'):
|
||||
await self.detail_trans()
|
||||
else:
|
||||
await self.detail_trans_for_recovery(product_name, deleted_imgs)
|
||||
|
|
|
|||
7
gui.py
7
gui.py
|
|
@ -751,13 +751,6 @@ class AutoPercentyGUI(QWidget):
|
|||
# self.browser_controller.start() # QThread의 start() 호출로 run() 실행
|
||||
self.logger.debug("브라우저 스레드가 시작되었습니다.")
|
||||
|
||||
# GUI 상태와 로그인 정보 가져오기
|
||||
self.browser_controller.toggle_states = {
|
||||
'optionIMGTrans': self.toggle_states['optionIMGTrans'],
|
||||
'detail_IMGTrans': self.toggle_states['detail_IMGTrans'],
|
||||
'thumb': self.toggle_states['thumb'],
|
||||
'vd_mode': self.toggle_states['vd_mode'],
|
||||
}
|
||||
self.browser_controller.login_infos = {
|
||||
'admin_id': self.admin_id_input.text(),
|
||||
'admin_pw': self.admin_pw_input.text(),
|
||||
|
|
|
|||
|
|
@ -212,6 +212,8 @@ class OptionHandler:
|
|||
# 3. 가격 낮은 순 정렬 클릭
|
||||
await self.low_order_click()
|
||||
|
||||
|
||||
# 4. 옵션 정보 수집
|
||||
try:
|
||||
self.logger.info(f"옵션 정보 수집")
|
||||
self.option_info = await self.collect_options_info()
|
||||
|
|
@ -220,9 +222,10 @@ class OptionHandler:
|
|||
# 옵션 처리 중 오류 발생 시 전체 로그 출력
|
||||
self.logger.error(f"옵션 정보 수집 중 오류 발생: {e}", exc_info=True)
|
||||
|
||||
# 4. 옵션 정보 수집 및 번역
|
||||
|
||||
# 5. 옵션 번역
|
||||
optionTrnas = toggle_states.get('optionTrnas')
|
||||
self.logger.debug(f"optionTrnas : {optionTrnas}")
|
||||
if optionTrnas:
|
||||
self.logger.debug(f"옵션 AI번역 : {optionTrnas}")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue