Skip to content

Commit

Permalink
Added enhanced LRC format support & Fix some issues & Optimize some code
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmozhijin committed May 11, 2024
1 parent b5121c8 commit ea44a08
Show file tree
Hide file tree
Showing 30 changed files with 2,292 additions and 2,122 deletions.
4 changes: 2 additions & 2 deletions LDDC.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Copyright (c) 2024 沉默の金
__version__ = "v0.6.3"
__version__ = "v0.6.4"
import logging
import os
import sys
Expand Down Expand Up @@ -65,7 +65,7 @@ def __init__(self) -> None:

self.search_widget = SearchWidget(self, threadpool)
self.local_match_widget = LocalMatchWidget(threadpool)
self.settings_widget = SettingWidget(logger)
self.settings_widget = SettingWidget(logger, self.widget_changed)
self.about_widget = AboutWidget(__version__)
self.encrypted_lyrics_widget = EncryptedLyricsWidget()
self.init_widgets()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- [x] 搜索QQ音乐、酷狗音乐、网易云音乐的单曲、专辑、歌单
- [x] 一键下载整个 专辑、歌单 的歌词
- [x] 一键为本地歌曲文件匹配歌词
- [x] 支持保存为多种格式(lrc、srt、ass)
- [x] 支持保存为多种格式(逐字lrc、逐行lrc、增强型lrc、srt、ass)
- [x] 双击预览歌词,直接保存
- [x] 多种类型(原文、译文、罗马音)歌词随意合并
- [x] 保存路径多种占位符随意组合
Expand Down
2 changes: 1 addition & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- [x] Search for singles, albums, and playlists on QQ Music, Kugou Music, and NetEase Cloud Music
- [x] One-click download of lyrics for entire albums and playlists
- [x] One-click match lyrics for local song files
- [x] Support for saving in multiple formats (lrc, srt, ass)
- [x] Support for saving in multiple formats (verbatim lrc,line by line lrc,Enhanced LRC, srt, ass)
- [x] Double-click to preview lyrics and save directly
- [x] Merge lyrics of various types (original, translated, romanized) at will
- [x] Save path with various placeholders for arbitrary combinations
Expand Down
Binary file modified img/en_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/en_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/zh_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/zh_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/i18n/LDDC_en.qm
Binary file not shown.
424 changes: 240 additions & 184 deletions res/i18n/LDDC_en.ts

Large diffs are not rendered by default.

2,545 changes: 1,296 additions & 1,249 deletions res/resource_rc.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ui/custom_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ProportionallyStretchedTableWidget(QTableWidget):
def __init__(self, parent: QWidget | None = None) -> None:
super().__init__(parent)
self.props = []
self.itemChanged.connect(self.adapt_size)

def set_proportions(self, props: list) -> None:
"""
Expand Down
5 changes: 5 additions & 0 deletions ui/encrypted_lyrics.ui
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<string>LRC(逐行)</string>
</property>
</item>
<item>
<property name="text">
<string>增强型LRC(ESLyric)</string>
</property>
</item>
<item>
<property name="text">
<string>SRT</string>
Expand Down
6 changes: 4 additions & 2 deletions ui/encrypted_lyrics_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def setupUi(self, encrypted_lyrics):
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.setObjectName(u"lyricsformat_comboBox")

self.horizontalLayout_2.addWidget(self.lyricsformat_comboBox)
Expand Down Expand Up @@ -158,8 +159,9 @@ def retranslateUi(self, encrypted_lyrics):
self.label_2.setText(QCoreApplication.translate("encrypted_lyrics", u"\u8f6c\u6362\u7684\u683c\u5f0f\uff1a", None))
self.lyricsformat_comboBox.setItemText(0, QCoreApplication.translate("encrypted_lyrics", u"LRC(\u9010\u5b57)", None))
self.lyricsformat_comboBox.setItemText(1, QCoreApplication.translate("encrypted_lyrics", u"LRC(\u9010\u884c)", None))
self.lyricsformat_comboBox.setItemText(2, QCoreApplication.translate("encrypted_lyrics", u"SRT", None))
self.lyricsformat_comboBox.setItemText(3, QCoreApplication.translate("encrypted_lyrics", u"ASS", None))
self.lyricsformat_comboBox.setItemText(2, QCoreApplication.translate("encrypted_lyrics", u"\u589e\u5f3a\u578bLRC(ESLyric)", None))
self.lyricsformat_comboBox.setItemText(3, QCoreApplication.translate("encrypted_lyrics", u"SRT", None))
self.lyricsformat_comboBox.setItemText(4, QCoreApplication.translate("encrypted_lyrics", u"ASS", None))

self.open_pushButton.setText(QCoreApplication.translate("encrypted_lyrics", u"\u6253\u5f00\u52a0\u5bc6\u6b4c\u8bcd", None))
self.convert_pushButton.setText(QCoreApplication.translate("encrypted_lyrics", u"\u8f6c\u6362\u683c\u5f0f", None))
Expand Down
5 changes: 5 additions & 0 deletions ui/local_match.ui
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@
<string>LRC(逐行)</string>
</property>
</item>
<item>
<property name="text">
<string>增强型LRC(ESLyric)</string>
</property>
</item>
<item>
<property name="text">
<string>SRT</string>
Expand Down
6 changes: 4 additions & 2 deletions ui/local_match_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def setupUi(self, local_match):
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.setObjectName(u"lyricsformat_comboBox")

self.gridLayout_5.addWidget(self.lyricsformat_comboBox, 1, 1, 1, 1)
Expand Down Expand Up @@ -345,8 +346,9 @@ def retranslateUi(self, local_match):
self.label_10.setText(QCoreApplication.translate("local_match", u"\u6b4c\u8bcd\u683c\u5f0f:", None))
self.lyricsformat_comboBox.setItemText(0, QCoreApplication.translate("local_match", u"LRC(\u9010\u5b57)", None))
self.lyricsformat_comboBox.setItemText(1, QCoreApplication.translate("local_match", u"LRC(\u9010\u884c)", None))
self.lyricsformat_comboBox.setItemText(2, QCoreApplication.translate("local_match", u"SRT", None))
self.lyricsformat_comboBox.setItemText(3, QCoreApplication.translate("local_match", u"ASS", None))
self.lyricsformat_comboBox.setItemText(2, QCoreApplication.translate("local_match", u"\u589e\u5f3a\u578bLRC(ESLyric)", None))
self.lyricsformat_comboBox.setItemText(3, QCoreApplication.translate("local_match", u"SRT", None))
self.lyricsformat_comboBox.setItemText(4, QCoreApplication.translate("local_match", u"ASS", None))

self.kg_checkBox.setText(QCoreApplication.translate("local_match", u"\u9177\u72d7\u97f3\u4e50", None))
self.label_7.setText(QCoreApplication.translate("local_match", u"\u6b4c\u8bcd\u6765\u6e90:", None))
Expand Down
5 changes: 5 additions & 0 deletions ui/search.ui
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,11 @@
<string>LRC(逐行)</string>
</property>
</item>
<item>
<property name="text">
<string>增强型LRC(ESLyric)</string>
</property>
</item>
<item>
<property name="text">
<string>SRT</string>
Expand Down
6 changes: 4 additions & 2 deletions ui/search_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def setupUi(self, search):
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.addItem("")
self.lyricsformat_comboBox.setObjectName(u"lyricsformat_comboBox")

self.horizontalLayout_9.addWidget(self.lyricsformat_comboBox)
Expand Down Expand Up @@ -395,8 +396,9 @@ def retranslateUi(self, search):
self.label_9.setText(QCoreApplication.translate("search", u"\u6b4c\u8bcd\u683c\u5f0f:", None))
self.lyricsformat_comboBox.setItemText(0, QCoreApplication.translate("search", u"LRC(\u9010\u5b57)", None))
self.lyricsformat_comboBox.setItemText(1, QCoreApplication.translate("search", u"LRC(\u9010\u884c)", None))
self.lyricsformat_comboBox.setItemText(2, QCoreApplication.translate("search", u"SRT", None))
self.lyricsformat_comboBox.setItemText(3, QCoreApplication.translate("search", u"ASS", None))
self.lyricsformat_comboBox.setItemText(2, QCoreApplication.translate("search", u"\u589e\u5f3a\u578bLRC(ESLyric)", None))
self.lyricsformat_comboBox.setItemText(3, QCoreApplication.translate("search", u"SRT", None))
self.lyricsformat_comboBox.setItemText(4, QCoreApplication.translate("search", u"ASS", None))

self.save_list_lyrics_pushButton.setText(QCoreApplication.translate("search", u"\u4fdd\u5b58\u4e13\u8f91/\u6b4c\u5355\u7684\u6b4c\u8bcd", None))
self.save_preview_lyric_pushButton.setText(QCoreApplication.translate("search", u"\u4fdd\u5b58\u9884\u89c8\u7684\u6b4c\u8bcd", None))
Expand Down
Loading

0 comments on commit ea44a08

Please sign in to comment.