Skip to content

Commit

Permalink
New default app id
Browse files Browse the repository at this point in the history
  • Loading branch information
glebb committed May 2, 2024
1 parent fbda3c7 commit 16d7bda
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 44 deletions.
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest==6.2.2
pytest-mock==3.5.1
pytest-qt==3.3.0
pytest
pytest-mock
pytest-qt
black
Binary file modified src/rocksmithconvert/assets/wood.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 29 additions & 27 deletions src/rocksmithconvert/mainwindow.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt6 UI code generator 6.3.1
# Created by: PyQt6 UI code generator 6.7.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.


from rocksmithconvert.qt_wrapper import QtCore, QtWidgets
from PyQt6 import QtCore, QtGui, QtWidgets


class Ui_MainWindow(object):
Expand All @@ -22,14 +22,15 @@ def setupUi(self, MainWindow):
MainWindow.setMaximumSize(QtCore.QSize(800, 600))
MainWindow.setBaseSize(QtCore.QSize(640, 480))
MainWindow.setAutoFillBackground(True)
MainWindow.setStyleSheet("")
MainWindow.setUnifiedTitleAndToolBarOnMac(True)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget = QtWidgets.QWidget(parent=MainWindow)
self.centralwidget.setAutoFillBackground(False)
self.centralwidget.setStyleSheet("")
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_2.setObjectName("gridLayout_2")
self.frameDropArea = DropArea(self.centralwidget)
self.frameDropArea = DropArea(parent=self.centralwidget)
self.frameDropArea.setAcceptDrops(True)
self.frameDropArea.setAutoFillBackground(False)
self.frameDropArea.setFrameShape(QtWidgets.QFrame.Shape.NoFrame)
Expand All @@ -38,7 +39,7 @@ def setupUi(self, MainWindow):
self.frameDropArea.setObjectName("frameDropArea")
self.gridLayout_4 = QtWidgets.QGridLayout(self.frameDropArea)
self.gridLayout_4.setObjectName("gridLayout_4")
self.progressBar = MyProgress(self.frameDropArea)
self.progressBar = MyProgress(parent=self.frameDropArea)
self.progressBar.setAutoFillBackground(False)
self.progressBar.setStyleSheet("padding: 3px;")
self.progressBar.setProperty("value", 0)
Expand All @@ -47,7 +48,7 @@ def setupUi(self, MainWindow):
self.gridLayout_4.addWidget(self.progressBar, 1, 0, 1, 4)
self.verticalLayoutRight = QtWidgets.QVBoxLayout()
self.verticalLayoutRight.setObjectName("verticalLayoutRight")
self.plainTextEdit = QtWidgets.QPlainTextEdit(self.frameDropArea)
self.plainTextEdit = QtWidgets.QPlainTextEdit(parent=self.frameDropArea)
self.plainTextEdit.setAutoFillBackground(True)
self.plainTextEdit.setLineWrapMode(QtWidgets.QPlainTextEdit.LineWrapMode.NoWrap)
self.plainTextEdit.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.TextSelectableByMouse)
Expand All @@ -57,7 +58,7 @@ def setupUi(self, MainWindow):
self.gridLayout_4.addLayout(self.verticalLayoutRight, 0, 3, 1, 1)
self.verticalLayoutLeft = QtWidgets.QVBoxLayout()
self.verticalLayoutLeft.setObjectName("verticalLayoutLeft")
self.textBrowser = QtWidgets.QTextBrowser(self.frameDropArea)
self.textBrowser = QtWidgets.QTextBrowser(parent=self.frameDropArea)
self.textBrowser.setAcceptDrops(False)
self.textBrowser.setAutoFillBackground(False)
self.textBrowser.setStyleSheet("")
Expand All @@ -66,7 +67,7 @@ def setupUi(self, MainWindow):
self.textBrowser.setOpenLinks(True)
self.textBrowser.setObjectName("textBrowser")
self.verticalLayoutLeft.addWidget(self.textBrowser)
self.widget = QtWidgets.QWidget(self.frameDropArea)
self.widget = QtWidgets.QWidget(parent=self.frameDropArea)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -79,29 +80,29 @@ def setupUi(self, MainWindow):
self.widget.setObjectName("widget")
self.gridLayout = QtWidgets.QGridLayout(self.widget)
self.gridLayout.setObjectName("gridLayout")
self.label = QtWidgets.QLabel(self.widget)
self.label = QtWidgets.QLabel(parent=self.widget)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.label_2 = QtWidgets.QLabel(self.widget)
self.label_2 = QtWidgets.QLabel(parent=self.widget)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 5, 0, 1, 1)
self.label_3 = QtWidgets.QLabel(self.widget)
self.label_3 = QtWidgets.QLabel(parent=self.widget)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 6, 0, 1, 1)
self.comboBoxAppId = QtWidgets.QComboBox(self.widget)
self.comboBoxAppId = QtWidgets.QComboBox(parent=self.widget)
self.comboBoxAppId.setEditable(True)
self.comboBoxAppId.setObjectName("comboBoxAppId")
self.comboBoxAppId.addItem("")
self.comboBoxAppId.addItem("")
self.gridLayout.addWidget(self.comboBoxAppId, 6, 1, 1, 1)
self.comboBoxRename = QtWidgets.QComboBox(self.widget)
self.comboBoxRename = QtWidgets.QComboBox(parent=self.widget)
self.comboBoxRename.setAutoFillBackground(True)
self.comboBoxRename.setObjectName("comboBoxRename")
self.comboBoxRename.addItem("")
self.comboBoxRename.addItem("")
self.comboBoxRename.addItem("")
self.gridLayout.addWidget(self.comboBoxRename, 5, 1, 1, 1)
self.pushButtonSelectTarget = QtWidgets.QPushButton(self.widget)
self.pushButtonSelectTarget = QtWidgets.QPushButton(parent=self.widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -111,7 +112,7 @@ def setupUi(self, MainWindow):
self.pushButtonSelectTarget.setStyleSheet("border-color: rgb(0, 0, 0);")
self.pushButtonSelectTarget.setObjectName("pushButtonSelectTarget")
self.gridLayout.addWidget(self.pushButtonSelectTarget, 13, 0, 1, 2)
self.comboBoxPlatform = QtWidgets.QComboBox(self.widget)
self.comboBoxPlatform = QtWidgets.QComboBox(parent=self.widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -124,14 +125,14 @@ def setupUi(self, MainWindow):
self.comboBoxPlatform.addItem("")
self.comboBoxPlatform.addItem("")
self.gridLayout.addWidget(self.comboBoxPlatform, 0, 1, 1, 1)
self.labelTarget = QtWidgets.QLabel(self.widget)
self.labelTarget = QtWidgets.QLabel(parent=self.widget)
self.labelTarget.setObjectName("labelTarget")
self.gridLayout.addWidget(self.labelTarget, 12, 0, 1, 1)
self.checkBoxOverwrite = QtWidgets.QCheckBox(self.widget)
self.checkBoxOverwrite = QtWidgets.QCheckBox(parent=self.widget)
self.checkBoxOverwrite.setObjectName("checkBoxOverwrite")
self.gridLayout.addWidget(self.checkBoxOverwrite, 2, 0, 1, 1)
self.verticalLayoutLeft.addWidget(self.widget)
self.widget_3 = QtWidgets.QWidget(self.frameDropArea)
self.widget_3 = QtWidgets.QWidget(parent=self.frameDropArea)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand All @@ -142,10 +143,10 @@ def setupUi(self, MainWindow):
self.widget_3.setObjectName("widget_3")
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.widget_3)
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.checkBoxAutoProcess = QtWidgets.QCheckBox(self.widget_3)
self.checkBoxAutoProcess = QtWidgets.QCheckBox(parent=self.widget_3)
self.checkBoxAutoProcess.setObjectName("checkBoxAutoProcess")
self.verticalLayout_4.addWidget(self.checkBoxAutoProcess)
self.pushButtonSelectSource = QtWidgets.QPushButton(self.widget_3)
self.pushButtonSelectSource = QtWidgets.QPushButton(parent=self.widget_3)
self.pushButtonSelectSource.setEnabled(True)
self.pushButtonSelectSource.setObjectName("pushButtonSelectSource")
self.verticalLayout_4.addWidget(self.pushButtonSelectSource)
Expand All @@ -155,24 +156,24 @@ def setupUi(self, MainWindow):
MainWindow.setCentralWidget(self.centralwidget)

self.retranslateUi(MainWindow)
self.comboBoxAppId.setCurrentIndex(1)
self.comboBoxAppId.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)

def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Rocksmith 2014 CDLC convert pc/mac"))
self.plainTextEdit.setPlaceholderText(_translate("MainWindow", "DROP FILES HERE"))
self.textBrowser.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'.AppleSystemUIFont\'; font-size:13pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Drop files to app for processing.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Drop files to app for processing. Specify features to convert / rename / change app id of the songs.</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Original files remain as they are, new files are created to target folder. If target file exists, processing is skipped.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Original files remain as they are, new files are created to target folder. If target file exists, processing is skipped, unless &quot;Overwrite existing&quot; is selected.</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Rename uses the format (artist-song) without special characters and will either shorten the filename to 10+10 characters, or use the full name.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Rename feature uses the format (artist-song) without special characters and will either shorten the filename to 10+10 characters, or use the full name for the new files. This is completely optional and you can keep the original filenames as well.</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">To change cdlc app ID, set the desired app ID. If option is disabled, app ID is untouched.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">To change cdlc app ID, set the desired app ID. If option is disabled, app ID is untouched. App id needs to be changed, if you don\'t own cherub rock ODLC. In that case, the default value 221680 should work.</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">With auto-processing enabled, the app will check specified folder periodically and execute processing without further user interaction when new files are found. </p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
Expand All @@ -181,7 +182,7 @@ def retranslateUi(self, MainWindow):
self.label_2.setText(_translate("MainWindow", "Rename scheme:"))
self.label_3.setText(_translate("MainWindow", "Change AppID:"))
self.comboBoxAppId.setItemText(0, _translate("MainWindow", "Disabled"))
self.comboBoxAppId.setItemText(1, _translate("MainWindow", "248750"))
self.comboBoxAppId.setItemText(1, _translate("MainWindow", "221680"))
self.comboBoxRename.setCurrentText(_translate("MainWindow", "Disabled"))
self.comboBoxRename.setItemText(0, _translate("MainWindow", "Disabled"))
self.comboBoxRename.setItemText(1, _translate("MainWindow", "Short"))
Expand All @@ -197,6 +198,7 @@ def retranslateUi(self, MainWindow):
from rocksmithconvert.droparea import DropArea
from rocksmithconvert.myprogress import MyProgress


if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Expand Down
14 changes: 7 additions & 7 deletions src/rocksmithconvert/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,16 @@
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Drop files to app for processing.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Drop files to app for processing. Specify features to convert / rename / change app id of the songs.&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Original files remain as they are, new files are created to target folder. If target file exists, processing is skipped.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Original files remain as they are, new files are created to target folder. If target file exists, processing is skipped, unless &amp;quot;Overwrite existing&amp;quot; is selected.&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Rename uses the format (artist-song) without special characters and will either shorten the filename to 10+10 characters, or use the full name.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Rename feature uses the format (artist-song) without special characters and will either shorten the filename to 10+10 characters, or use the full name for the new files. This is completely optional and you can keep the original filenames as well.&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;To change cdlc app ID, set the desired app ID. If option is disabled, app ID is untouched.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;To change cdlc app ID, set the desired app ID. If option is disabled, app ID is untouched. App id needs to be changed, if you don't own cherub rock ODLC. In that case, the default value 221680 should work.&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;With auto-processing enabled, the app will check specified folder periodically and execute processing without further user interaction when new files are found. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
Expand Down Expand Up @@ -206,7 +206,7 @@ p, li { white-space: pre-wrap; }
<bool>true</bool>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<item>
<property name="text">
Expand All @@ -215,7 +215,7 @@ p, li { white-space: pre-wrap; }
</item>
<item>
<property name="text">
<string>248750</string>
<string>221680</string>
</property>
</item>
</widget>
Expand Down
2 changes: 1 addition & 1 deletion src/rocksmithconvert/mywindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def updateProgress(self, file: Dict[str, str]) -> None:
)
if file["processed"]:
_, tail = path.split(file["processed"])
self.plainTextEdit.appendHtml(f"OK: {tail}")
self.plainTextEdit.appendHtml(f"Processed OK: {tail}")
self.plainTextEdit.ensureCursorVisible()

@QtCore.pyqtSlot(int)
Expand Down
Loading

0 comments on commit 16d7bda

Please sign in to comment.