diff src/track/media.cc @ 230:2f5a9247e501

torrents: implement download button erg
author Paper <paper@paper.us.eu.org>
date Sat, 13 Jan 2024 09:42:02 -0500
parents 649786bae914
children 69f4768a820c
line wrap: on
line diff
--- a/src/track/media.cc	Wed Jan 10 21:23:57 2024 -0500
+++ b/src/track/media.cc	Sat Jan 13 09:42:02 2024 -0500
@@ -11,6 +11,8 @@
 #include <vector>
 #include <filesystem>
 
+#include <iostream>
+
 #include "animia.h"
 
 namespace Track {
@@ -44,9 +46,13 @@
 			for (const auto& info : media.information) {
 				switch (info.type) {
 					case animia::MediaInfoType::File:
+						vec.push_back(std::filesystem::path(info.value).filename().u8string());
+						success |= true;
+						break;
 					case animia::MediaInfoType::Title:
-						vec.push_back(std::filesystem::path(info.value).filename().string());
+						vec.push_back(info.value);
 						success |= true;
+						break;
 					default:
 						break;
 				}