Browse Source

Added audio-only (libvorbis) download option + save user preferences on exit

master
ThePBone 7 months ago
parent
commit
ccb4109421
7 changed files with 76 additions and 356 deletions
  1. +0
    -337
      CrunchyrollDownloader.pro.user
  2. +19
    -11
      interface/progressview.cpp
  3. +2
    -1
      interface/progressview.h
  4. +1
    -0
      main.cpp
  5. +39
    -3
      mainwindow.cpp
  6. +4
    -0
      mainwindow.h
  7. +11
    -4
      mainwindow.ui

+ 0
- 337
CrunchyrollDownloader.pro.user View File

@@ -1,337 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2019-11-15T16:55:45. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{ecd58519-034e-4ff9-928c-b9de40703d5d}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
<value type="QString">-fno-delayed-template-parsing</value>
</valuelist>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.9.8 MSVC2013 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.9.8 MSVC2013 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.598.win64_msvc2013_64_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Developement/build-CrunchyrollDownloader-Desktop_Qt_5_9_8_MSVC2013_64bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Erstellen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Bereinigen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Developement/build-CrunchyrollDownloader-Desktop_Qt_5_9_8_MSVC2013_64bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Erstellen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Bereinigen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Developement/build-CrunchyrollDownloader-Desktop_Qt_5_9_8_MSVC2013_64bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Erstellen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Bereinigen</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deployment</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deployment-Konfiguration</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
<value type="int" key="Analyzer.Perf.Frequency">250</value>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CrunchyrollDownloader</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/Developement/CrunchyrollDownloader/CrunchyrollDownloader.pro</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory">D:/Developement/build-CrunchyrollDownloader-Desktop_Qt_5_9_8_MSVC2013_64bit-Debug/debug</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Developement/build-CrunchyrollDownloader-Desktop_Qt_5_9_8_MSVC2013_64bit-Release</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>

+ 19
- 11
interface/progressview.cpp View File

@@ -30,12 +30,13 @@ ProgressView::~ProgressView()
delete ui;
}

void ProgressView::setArgs(CrunchyrollAPI* _api, QVector<meta_episode_t> _me, bool _onlyM3U, QString _directory,quality _quality){
void ProgressView::setArgs(CrunchyrollAPI* _api, QVector<meta_episode_t> _me, bool _onlyM3U, bool _onlyOGG, QString _directory,quality _quality){
api = _api;
m_episodes = _me;
onlyM3U = _onlyM3U;
directory = _directory;
gquality = _quality;
onlyOGG = _onlyOGG;
}

void ProgressView::reset(){
@@ -148,11 +149,13 @@ void ProgressView::startDownload(){
episode.collection = meta_episode.collection;
QFile futurepathMP4(constructPath(episode,directory) + constructFilename(episode,".mp4"));
QFile futurepathM3U(constructPath(episode,directory) + constructFilename(episode,".m3u8"));
QFile futurepathOGG(constructPath(episode,directory) + constructFilename(episode,".ogg"));

if(episode.streams.count() < 1)
unavailableEpisodes.append(episode);
else if ((futurepathMP4.exists() && !onlyM3U) ||
(futurepathM3U.exists() && onlyM3U))
else if ((futurepathMP4.exists() && (!onlyM3U&&!onlyOGG)) ||
(futurepathM3U.exists() && onlyM3U) ||
(futurepathOGG.exists() && onlyOGG))
alreadyExists.append(episode);
else
episodes.append(episode);
@@ -220,7 +223,6 @@ void ProgressView::startDownload(){
emit isProcessingStateChanged(false);
return;
}

//Download videos with ffmpeg
ui->p_singleprogress->setRange(0,100);
ui->p_singleprogress->setValue(0);
@@ -270,7 +272,9 @@ void ProgressView::downloadNext(){
QDir d(dir);
if(!d.exists())
d.mkpath(dir);
QString filename(dir + constructFilename(episode,".mp4"));
QString filename;
if(onlyOGG) filename = dir + constructFilename(episode,".ogg");
else filename = dir + constructFilename(episode,".mp4");
#ifdef WIN32
QString program = "ffmpeg.exe";
#else
@@ -290,7 +294,7 @@ void ProgressView::downloadNext(){
}
QFile::remove(filename);
}
if(gquality != quality::best){
if(gquality != quality::best && !onlyOGG){
ui->p_skip->setEnabled(false);
ui->p_cancel->setEnabled(false);
ui->p_stat->setText("Analysing available qualities...");
@@ -352,15 +356,19 @@ void ProgressView::downloadNext(){
});
return;
}
QStringList params;
#ifdef WIN32
QStringList params = QStringList() << "-i" << stream.url.toString()
params = QStringList() << "-i" << stream.url.toString()
<< "-bsf:a" << "aac_adtstoasc" << "-c" << "copy"
<< "-dn" << "-stats" << "-v" << "quiet" << filename ;
#else
QStringList params = QStringList() << "-c" << "ffmpeg -i \"" + stream.url.toString() + "\" "
"-bsf:a aac_adtstoasc -c copy "
"-stats -v quiet \"" + filename + "\"";
if(!onlyOGG){
params = QStringList() << "-c" << "ffmpeg -i \"" + stream.url.toString() + "\" "
"-bsf:a aac_adtstoasc -c copy -stats -v quiet \"" + filename + "\"";
} else {
params = QStringList() << "-c" << "ffmpeg -i \"" + stream.url.toString() + "\" "
"-map 0:a:0 -c:a libvorbis -stats -v quiet \"" + filename + "\"";
}
#endif
beginFFmpeg(program,params);
return;


+ 2
- 1
interface/progressview.h View File

@@ -19,7 +19,7 @@ public:
~ProgressView();
void reset();
void setArgs(CrunchyrollAPI* _api, QVector<meta_episode_t> _me,
bool _onlyM3U, QString _directory, quality _quality);
bool _onlyM3U, bool _onlyOGG,QString _directory, quality _quality);

public slots:
void startDownload();
@@ -45,6 +45,7 @@ private:
QProcess *mFFmpegProcess;
int episodeCount;
bool onlyM3U;
bool onlyOGG;
bool isProcessing = false;
quality gquality;
QString directory;


+ 1
- 0
main.cpp View File

@@ -52,6 +52,7 @@ int main(int argc, char *argv[])
if(!parser.isSet(terminalOption)){
a.setStyle("Fusion");
MainWindow w;
a.setPalette(w.style()->standardPalette());
w.show();
return a.exec();
}


+ 39
- 3
mainwindow.cpp View File

@@ -6,6 +6,7 @@
#include "episodes.h"
#include "textpopup.h"
#include <QDebug>
#include <QSettings>
#include <QDesktopServices>
#include <QMessageBox>
#include <QStyleFactory>
@@ -16,6 +17,9 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);

settings = new QSettings("ThePBone","CrunchyrollDownloader");
loadUserdata(false);

for ( const auto& i : QStyleFactory::keys() ){
QAction* act = new QAction(i);
ui->menuTheme->addAction(act);
@@ -41,12 +45,20 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->dlmode_mp4, &QRadioButton::clicked, this, [this]() {
updateProgressArgs();
});
connect(ui->dlmode_ogg, &QRadioButton::clicked, this, [this]() {
updateProgressArgs();
});
connect(ui->dl_outdir_box, &QGroupBox::clicked, this, [this]() {
updateProgressArgs();
saveUserdata();
});
connect(ui->dl_outdir, &QLineEdit::textEdited, this, [this]() {
updateProgressArgs();
saveUserdata();
});
connect(ui->bypassGeoblock,&QCheckBox::clicked,this,[this](){saveUserdata();});
connect(ui->useAccount,&QGroupBox::clicked,this,[this](){saveUserdata();});
connect(ui->acc_mail,&QLineEdit::textEdited,this,[this](){saveUserdata();});
connect(ui->quality_selection, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, [this]() {
updateProgressArgs();
});
@@ -58,7 +70,25 @@ MainWindow::~MainWindow()
{
delete ui;
}

void MainWindow::saveUserdata(){
settings->setValue("customOutputDir", ui->dl_outdir->text());
settings->setValue("accountMail", ui->acc_mail->text());
settings->setValue("useCustomOutputDir", ui->dl_outdir_box->isChecked());
settings->setValue("useAccount", ui->useAccount->isChecked());
settings->setValue("useProxyUS", ui->bypassGeoblock->isChecked());
}
void MainWindow::loadUserdata(bool loadAccount){
QString customOutputDir = settings->value("customOutputDir", "").toString();
QString accountMail = settings->value("accountMail", "").toString();
bool useCustomOutputDir = settings->value("useCustomOutputDir",false).toBool();
bool useAccount = settings->value("useAccount",false).toBool();
bool useProxyUS = settings->value("useProxyUS",false).toBool();
ui->dl_outdir->setText(customOutputDir);
if(loadAccount)ui->acc_mail->setText(accountMail);
if(loadAccount)ui->useAccount->setChecked(useAccount);
ui->dl_outdir_box->setChecked(useCustomOutputDir);
ui->bypassGeoblock->setChecked(useProxyUS);
}
void MainWindow::show()
{
QMainWindow::show();
@@ -73,6 +103,10 @@ void MainWindow::show()
#endif
}
reloadBlocks(true);
//Load account mail from memory *later*
//because the password is not saved,
//we would get an api error when initialing a session on startup
loadUserdata(true);
}

bool MainWindow::checkFFmpeg(){
@@ -88,9 +122,11 @@ bool MainWindow::checkFFmpeg(){

void MainWindow::updateProgressArgs(){
if(ui->dl_outdir_box->isChecked() && ui->dl_outdir->text() != "")
ui->progressview->setArgs(api,currentEpisodes,ui->dlmode_m3u->isChecked(),ui->dl_outdir->text(),getQuality());
ui->progressview->setArgs(api,currentEpisodes,ui->dlmode_m3u->isChecked(),
ui->dlmode_ogg->isChecked(),ui->dl_outdir->text(),getQuality());
else
ui->progressview->setArgs(api,currentEpisodes,ui->dlmode_m3u->isChecked(),".",getQuality());
ui->progressview->setArgs(api,currentEpisodes,ui->dlmode_m3u->isChecked(),
ui->dlmode_ogg->isChecked(),".",getQuality());
}

void MainWindow::openSearchDlg(){


+ 4
- 0
mainwindow.h View File

@@ -2,6 +2,7 @@
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSettings>
#include "WebLoader/src/NetworkRequestLoader.h"
#include "models.h"
#include "crunchyrollapi.h"
@@ -35,6 +36,8 @@ private slots:
void showCredits();
void showLicense();
void openGithub();
void saveUserdata();
void loadUserdata(bool loadAccount);

private:
Ui::MainWindow *ui;
@@ -43,6 +46,7 @@ private:
QVector<meta_episode_t> currentEpisodes;
QVector<meta_episode_t> allEpisodes;
CrunchyrollAPI* api;
QSettings* settings;
void updateProgressArgs();
};



+ 11
- 4
mainwindow.ui View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>674</width>
<height>813</height>
<height>841</height>
</rect>
</property>
<property name="windowTitle">
@@ -249,7 +249,7 @@
<string/>
</property>
<property name="text">
<string></string>
<string/>
</property>
<property name="frame">
<bool>true</bool>
@@ -265,7 +265,7 @@
<item>
<widget class="QLineEdit" name="acc_pass">
<property name="text">
<string></string>
<string/>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
@@ -416,6 +416,13 @@
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="dlmode_ogg">
<property name="text">
<string>Audio only (ogg format)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -518,7 +525,7 @@
<x>0</x>
<y>0</y>
<width>674</width>
<height>20</height>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuHelp">


Loading…
Cancel
Save