Skip to content

Commit

Permalink
Shared - Fix Chapter Naming
Browse files Browse the repository at this point in the history
  • Loading branch information
nlogozzo committed Dec 24, 2023
1 parent 88ea841 commit 612333b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion NickvisionTubeConverter.GNOME/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public Program(string[] args)
_mainWindow = null;
_mainWindowController = new MainWindowController(args);
_mainWindowController.AppInfo.Changelog =
@"* Updated translations (Thanks everyone on Weblate!)";
@"* Fixed an issue where split chapters were not renamed correctly
* Updated translations (Thanks everyone on Weblate!)";
_application.OnActivate += OnActivate;
g_signal_connect_data(_application.Handle, "open", _openCallback, IntPtr.Zero, IntPtr.Zero, 0);
if (File.Exists(Path.GetFullPath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!) + "/org.nickvision.tubeconverter.gresource"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<releases>
<release version="2023.12.0" date="2023-12-01">
<description translatable="no">
<p>- Fixed an issue where split chapters were not renamed correctly</p>
<p>- Updated translations (Thanks everyone on Weblate!)</p>
</description>
</release>
Expand Down
7 changes: 5 additions & 2 deletions NickvisionTubeConverter.Shared/Models/Download.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,16 @@ public void Start(DownloadOptions options)
//Setup download params
var hooks = new List<Action<PyDict>> { ProgressHook };
var postProcessors = new List<Dictionary<string, dynamic>>();
var outtmpl = new PyDict();
outtmpl["default"] = new PyString($"{Id}.%(ext)s");
outtmpl["chapter"] = new PyString($"%(section_number)03d - {Id}.%(ext)s");
_ytOpt = new Dictionary<string, dynamic> {
{ "quiet", false },
{ "ignoreerrors", "downloadonly" },
{ "progress_hooks", hooks },
{ "postprocessor_hooks", hooks },
{ "merge_output_format", null },
{ "outtmpl", $"{Id.ToString()}.%(ext)s" },
{ "merge_output_format", PyObject.None },
{ "outtmpl", outtmpl },
{ "ffmpeg_location", DependencyLocator.Find("ffmpeg")! },
{ "windowsfilenames", options.LimitCharacters },
{ "encoding", "utf_8" },
Expand Down
3 changes: 2 additions & 1 deletion NickvisionTubeConverter.WinUI/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public App()
{
InitializeComponent();
_controller = new MainWindowController(Array.Empty<string>());
_controller.AppInfo.Changelog = @"- Redesigned the app's UI
_controller.AppInfo.Changelog = @"- Fixed an issue where split chapters were not renamed correctly
- Redesigned the app's UI
- Updated translations (Thanks everyone on Weblate!)";
if (_controller.Theme != Theme.System)
{
Expand Down

0 comments on commit 612333b

Please sign in to comment.