diff src/track/media.cc @ 114:ab191e28e69d

*: add initial torrent stuff WOAH! these checkboxes are a pain in my fucking ass
author Paper <mrpapersonic@gmail.com>
date Tue, 07 Nov 2023 08:03:42 -0500
parents 2004b41d4a59
children 39521c47c7a3
line wrap: on
line diff
--- a/src/track/media.cc	Mon Nov 06 13:48:11 2023 -0500
+++ b/src/track/media.cc	Tue Nov 07 08:03:42 2023 -0500
@@ -40,10 +40,18 @@
 	ret["language"] = Strings::ToUtf8String(elements.get(anitomy::kElementLanguage));
 	ret["group"] = Strings::ToUtf8String(elements.get(anitomy::kElementReleaseGroup));
 	ret["episode"] = Strings::ToUtf8String(elements.get(anitomy::kElementEpisodeNumber));
+	ret["resolution"] = Strings::ToUtf8String(elements.get(anitomy::kElementVideoResolution));
 
 	return ret;
 }
 
+std::unordered_map<std::string, std::string> GetFileElements(std::string basename) {
+	anitomy::Anitomy anitomy;
+	anitomy.Parse(Strings::ToWstring(basename));
+
+	return GetMapFromElements(anitomy.elements());
+}
+
 std::unordered_map<std::string, std::string> GetFileElements(Filesystem::Path path) {
 	anitomy::Anitomy anitomy;
 	anitomy.Parse(Strings::ToWstring(path.Basename()));