- Redesigned with the latest libadwaita 1.2
diff --git a/src/controllers/adddownloaddialogcontroller.cpp b/src/controllers/adddownloaddialogcontroller.cpp
index cbd923386..661d39f66 100644
--- a/src/controllers/adddownloaddialogcontroller.cpp
+++ b/src/controllers/adddownloaddialogcontroller.cpp
@@ -66,7 +66,7 @@ DownloadCheckStatus AddDownloadDialogController::setDownload(const std::string&
DownloadCheckStatus checkStatus{ checkIfDownloadValid() };
if(checkStatus == DownloadCheckStatus::Valid)
{
- m_configuration.setPreviousSaveFolder(std::filesystem::path(m_download.getSavePath()).parent_path().string() + "/");
+ m_configuration.setPreviousSaveFolder(std::filesystem::path(m_download.getSavePath()).parent_path().string());
m_configuration.setPreviousFileType(m_download.getMediaFileType());
m_configuration.save();
}
diff --git a/src/controllers/adddownloaddialogcontroller.hpp b/src/controllers/adddownloaddialogcontroller.hpp
index 4e43d0637..6f0ddc88e 100644
--- a/src/controllers/adddownloaddialogcontroller.hpp
+++ b/src/controllers/adddownloaddialogcontroller.hpp
@@ -7,6 +7,9 @@
namespace NickvisionTubeConverter::Controllers
{
+ /**
+ * Statuses for when a download is checked
+ */
enum class DownloadCheckStatus
{
Valid = 0,
@@ -17,16 +20,59 @@ namespace NickvisionTubeConverter::Controllers
EmptyNewFilename
};
+ /**
+ * A controller for the AddDownloadDialog
+ */
class AddDownloadDialogController
{
public:
+ /**
+ * Constructs an AddDownloadDialogController
+ *
+ * @param configuration The Configuration for the application (Stored as a reference)
+ */
AddDownloadDialogController(NickvisionTubeConverter::Models::Configuration& configuration);
+ /**
+ * Gets the response of the dialog
+ *
+ * @returns The response of the dialog
+ */
const std::string& getResponse() const;
+ /**
+ * Sets the response of the dialog
+ *
+ * @param response The new response of the dialog
+ */
void setResponse(const std::string& response);
+ /**
+ * Gets the previously used saved folder from the configuration
+ *
+ * @returns The previously used saved folder
+ */
std::string getPreviousSaveFolder() const;
+ /**
+ * Gets the previously used file type (as an int) from the configuration
+ *
+ * @returns The previously used file type (as an int)
+ */
int getPreviousFileTypeAsInt() const;
+ /**
+ * Gets the download created by the dialog
+ *
+ * @returns The download created by the dialog
+ */
const NickvisionTubeConverter::Models::Download& getDownload() const;
+ /**
+ * Checks if a download is valid
+ *
+ * @returns The DownloadCheckStatus
+ */
DownloadCheckStatus checkIfDownloadValid() const;
+ /**
+ * Sets the download from the dialog and checks if it is valid
+ *
+ * @returns The DownloadCheckStatus
+ */
DownloadCheckStatus setDownload(const std::string& videoUrl, int mediaFileType, const std::string& saveFolder, const std::string& newFilename, int quality);
private:
diff --git a/src/ui/application.cpp b/src/ui/application.cpp
index 5bf41d55b..c619248ed 100644
--- a/src/ui/application.cpp
+++ b/src/ui/application.cpp
@@ -13,7 +13,7 @@ Application::Application(const std::string& id, GApplicationFlags flags) : m_adw
m_appInfo.setName("Nickvision Tube Converter");
m_appInfo.setShortName("Tube Converter");
m_appInfo.setDescription("An easy-to-use YouTube video downloader.");
- m_appInfo.setVersion("2022.10.0-next");
+ m_appInfo.setVersion("2022.10.0-beta1");
m_appInfo.setChangelog("