diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8621d26
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2021-2024 Lafcadia
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..acadb9b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+## SongInformation
+A Song Information Modifier.
diff --git a/form.ui b/form.ui
index 85f4dde..339c0ff 100644
--- a/form.ui
+++ b/form.ui
@@ -11,7 +11,7 @@
- MainWindow
+ Music Information Modifier
@@ -25,13 +25,13 @@
- Weibei SC
- 24
+ Trebuchet MS
+ 18
true
- 加载MP3文件
+ Load MP3
@@ -55,13 +55,13 @@
- Weibei SC
- 24
+ Trebuchet MS
+ 18
true
- 歌曲名称:
+ Name:
@@ -85,13 +85,13 @@
- Weibei SC
- 24
+ Trebuchet MS
+ 18
true
- 歌手名称:
+ Artist:
@@ -105,13 +105,13 @@
- Weibei SC
- 24
+ Trebuchet MS
+ 18
true
- 专辑名称:
+ Album:
@@ -135,13 +135,13 @@
- Weibei SC
- 24
+ Trebuchet MS
+ 18
true
- 开始转换
+ Start Convertion
@@ -155,13 +155,13 @@
- Weibei SC
- 24
+ Trebuchet MS
+ 18
true
- 加载JPEG格式图片
+ Load JPEG
@@ -177,7 +177,7 @@
- ../Yulan.jpg
+ ./Yulan.jpg
diff --git a/main.py b/main.py
index d11c35e..ceba0d5 100644
--- a/main.py
+++ b/main.py
@@ -1,14 +1,15 @@
from mutagen.id3 import ID3, APIC, TIT2, TPE1, TALB
-from gui import Ui_MainWindow
+from ui import Ui_MainWindow
from PySide6.QtWidgets import QMainWindow, QApplication, QMessageBox
from PySide6 import QtCore, QtWidgets
-from PySide6.QtGui import QPixmap
+from PySide6.QtGui import QPixmap, QGuiApplication
+from PySide6.QtCore import Qt
import sys, os
-def BabyMode():
- os.system('pip3 install mutagen')
+# def BabyMode():
+# os.system('pip3 install mutagen')
-QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
+QGuiApplication.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.Ceil)
def setSongInfo(songfilepath, songtitle, songartist, songalbum, songpicpath):
audio = ID3(songfilepath)
@@ -48,18 +49,18 @@ def __init__(self):
self.ui.Start.clicked.connect(self.doer)
def JPGloader(self):
- self.JPG = QtWidgets.QFileDialog.getOpenFileName(self, "选取专辑图片","./", "All Files (*)")[0]
+ self.JPG = QtWidgets.QFileDialog.getOpenFileName(self, "Load JPG","./", "All Files (*)")[0]
self.ui.image.setPixmap(QPixmap(self.JPG))
def MP3loader(self):
- self.MP3 = QtWidgets.QFileDialog.getOpenFileName(self, "选取mp3音乐文件","./", "All Files (*)")[0]
+ self.MP3 = QtWidgets.QFileDialog.getOpenFileName(self, "Load MP3","./", "All Files (*)")[0]
def doer(self):
SingerName = self.ui.SingerName.toPlainText()
SongName = self.ui.SongName.toPlainText()
AlbumName = self.ui.AlbumName.toPlainText()
setSongInfo(self.MP3, SongName, SingerName, AlbumName, self.JPG)
- QMessageBox.information(self, "任务已经完成啦!","您原来的文件已被覆盖")
+ QMessageBox.information(self, "Done!","The file is overrided.")
if __name__ == "__main__":
app = QApplication(sys.argv)
diff --git a/ui.py b/ui.py
index c2cfc38..bd8b81c 100644
--- a/ui.py
+++ b/ui.py
@@ -3,15 +3,20 @@
################################################################################
## Form generated from reading UI file 'form.ui'
##
-## Created by: Qt User Interface Compiler version 6.3.0
+## Created by: Qt User Interface Compiler version 6.5.3
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
-from PySide6.QtCore import (QCoreApplication, QMetaObject, QRect)
-from PySide6.QtGui import QPixmap, QFont
-from PySide6.QtWidgets import (QLabel, QPlainTextEdit,
- QPushButton, QWidget)
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QApplication, QLabel, QMainWindow, QPlainTextEdit,
+ QPushButton, QSizePolicy, QWidget)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
@@ -24,8 +29,8 @@ def setupUi(self, MainWindow):
self.LoadMP3.setObjectName(u"LoadMP3")
self.LoadMP3.setGeometry(QRect(11, 20, 181, 61))
font = QFont()
- font.setFamilies([u"Weibei SC"])
- font.setPointSize(24)
+ font.setFamilies([u"Trebuchet MS"])
+ font.setPointSize(18)
font.setBold(True)
self.LoadMP3.setFont(font)
self.SongName = QPlainTextEdit(self.centralwidget)
@@ -60,7 +65,7 @@ def setupUi(self, MainWindow):
self.image = QLabel(self.centralwidget)
self.image.setObjectName(u"image")
self.image.setGeometry(QRect(440, 20, 300, 300))
- self.image.setPixmap(QPixmap(u"../Yulan.jpg"))
+ self.image.setPixmap(QPixmap(u"./Yulan.jpg"))
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
@@ -69,13 +74,13 @@ def setupUi(self, MainWindow):
# setupUi
def retranslateUi(self, MainWindow):
- MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"歌曲信息填写", None))
- self.LoadMP3.setText(QCoreApplication.translate("MainWindow", u"\u52a0\u8f7dMP3\u6587\u4ef6", None))
- self.label.setText(QCoreApplication.translate("MainWindow", u"\u6b4c\u66f2\u540d\u79f0:", None))
- self.label_2.setText(QCoreApplication.translate("MainWindow", u"\u6b4c\u624b\u540d\u79f0:", None))
- self.label_3.setText(QCoreApplication.translate("MainWindow", u"\u4e13\u8f91\u540d\u79f0:", None))
- self.Start.setText(QCoreApplication.translate("MainWindow", u"\u5f00\u59cb\u8f6c\u6362", None))
- self.LoadJPG.setText(QCoreApplication.translate("MainWindow", u"\u52a0\u8f7dJPEG\u683c\u5f0f\u56fe\u7247", None))
+ MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Music Information Modifier", None))
+ self.LoadMP3.setText(QCoreApplication.translate("MainWindow", u"Load MP3", None))
+ self.label.setText(QCoreApplication.translate("MainWindow", u"Name: ", None))
+ self.label_2.setText(QCoreApplication.translate("MainWindow", u"Artist: ", None))
+ self.label_3.setText(QCoreApplication.translate("MainWindow", u"Album: ", None))
+ self.Start.setText(QCoreApplication.translate("MainWindow", u"Start Convertion", None))
+ self.LoadJPG.setText(QCoreApplication.translate("MainWindow", u"Load JPEG", None))
self.image.setText("")
# retranslateUi