Skip to content

Commit

Permalink
완결 및 방영예정 접두사 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
dhku committed Oct 1, 2024
1 parent 4ccc6ab commit b91ba4f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion kudong/subs_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# =================================================
# Title: SMI AUTO DOWNLOADER
# Author: KUDONG
# Version: 1.2
# Version: 1.3
# Url: https://github.com/dhku/SMI-Auto-Downloader
# =================================================

Expand Down
37 changes: 29 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# BY: KUDONG
# PROJECT: SMI-AUTO-DOWNLOADER
# Version: 1.0.0
# Version: 1.1.0
#
# ///////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -73,7 +73,6 @@ def __init__(self):
restore_action.triggered.connect(self.showNormal)
tray_menu.addAction(restore_action)


def closeApp():
set_global_quitSignal(True)
QApplication.instance().quit()
Expand Down Expand Up @@ -135,6 +134,7 @@ def setWeekendButtonStyle(idx,sheet):
elif idx == 8:
widgets.pushButton_new.setStyleSheet(sheet);


def clickWeekendButton(idx):
global animeWeeklist,animeWeekIdx
#print("idx 클릭 "+ str(idx))
Expand All @@ -155,26 +155,46 @@ def clickWeekendButton(idx):
widgets.anime_time_table.setRowCount(len(animeWeeklist))
widgets.anime_time_table.setColumnCount(7)

widgets.anime_time_table.setFocusPolicy(Qt.NoFocus)

font = QFont()
font.setPointSize(25)

for k in animeWeeklist:
isOnAir = ""
if k.status == "OFF":
isOnAir = "[결방] "
prefix = ""

if idx < 7:
currentDate = datetime.now()
startDate = None
endDate = None

if k.startDate != '':
startDate = datetime.strptime(k.startDate, '%Y-%m-%d')
#print("출력" + k.startDate)

if k.endDate != '':
endDate = datetime.strptime(k.endDate, '%Y-%m-%d')
#print("출력" + k.endDate)

if k.status == "OFF":
prefix = "[결방] "
elif endDate is not None and currentDate > endDate:
prefix = "[完] "
elif startDate is not None and currentDate < startDate:
prefix = startDate.strftime("[%m-%d] ")

item = QTableWidgetItem(k.time)
item.setFont(font)

widgets.anime_time_table.setItem(count,0,item);
widgets.anime_time_table.setItem(count,1,QTableWidgetItem(isOnAir + k.subject));
widgets.anime_time_table.setItem(count,1,QTableWidgetItem(prefix + k.subject));
widgets.anime_time_table.setItem(count,2,QTableWidgetItem(str(k.animeNo)));
widgets.anime_time_table.setItem(count,3,QTableWidgetItem(k.genres));

widgets.anime_time_table.setItem(count,4,QTableWidgetItem(k.startDate));
widgets.anime_time_table.setItem(count,5,QTableWidgetItem(str(k.captionCount)));
widgets.anime_time_table.setItem(count,6,QTableWidgetItem(k.website));
count += 1
count += 1

for row in range(widgets.anime_time_table.rowCount()):
for column in range(widgets.anime_time_table.columnCount()):
Expand Down Expand Up @@ -865,6 +885,7 @@ def setValue(self,progress,count,output,isFinished):
def run(self):
QMetaObject.invokeMethod(self.main_window, "updateProgressBar", Qt.QueuedConnection,Q_ARG(int,self.progress),Q_ARG(int,self.count),Q_ARG(str,self.output),Q_ARG(bool,self.isFinished))


# 진입점
if __name__ == "__main__":

Expand All @@ -874,7 +895,7 @@ def run(self):
os.environ["QT_FONT_DPI"] = str(config['resolution'])

# 콘솔 로깅
console_logger_init() # 배포시 활성화
#console_logger_init() # 배포시 활성화

# UI 인스턴스화
app = QApplication(sys.argv)
Expand Down
2 changes: 1 addition & 1 deletion settings.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resolution: "96" # 기본값: 96 DPI (100% 배율) / 해상도에 따라 120 DPI(125%), 144 DPI(150%), 192 DPI(200%)를 설정하세요 (값 입력시 %는 입력하지 않습니다.)
resolution: "120" # 기본값: 120 DPI (125% 배율) / 해상도에 따라 96 DPI(100%), 120 DPI(125%), 144 DPI(150%), 192 DPI(200%)를 설정하세요 (값 입력시 %는 입력하지 않습니다.)

0 comments on commit b91ba4f

Please sign in to comment.