diff src/track/media.cc @ 108:2004b41d4a59

*: huge commit 1. WORKING LOCALIZATION + translation for Spanish and British English 2. idk like 2 changes for the dark theme :)
author Paper <mrpapersonic@gmail.com>
date Sun, 05 Nov 2023 23:31:49 -0500
parents 8b65c417c225
children ab191e28e69d
line wrap: on
line diff
--- a/src/track/media.cc	Sun Nov 05 17:44:49 2023 -0500
+++ b/src/track/media.cc	Sun Nov 05 23:31:49 2023 -0500
@@ -4,7 +4,6 @@
 #include "anitomy/anitomy.h"
 #include "core/filesystem.h"
 #include "core/strings.h"
-#include <QDebug>
 #include <string>
 #include <unordered_map>
 #include <vector>
@@ -17,14 +16,13 @@
 	std::vector<int> pids = Animia::get_all_pids();
 	for (int i : pids) {
 		for (const std::string& player : media_players) {
-			if (Animia::get_process_name(i) == player) {
-				std::vector<std::string> files = Animia::filter_system_files(Animia::get_open_files(i));
-				for (const std::string& f : files) {
-					Filesystem::Path p(f);
-					for (const std::string& ext : media_extensions) {
-						if (p.Extension() == ext)
-							return p;
-					}
+			if (Animia::get_process_name(i) != player)
+				continue;
+			for (const std::string& f : Animia::filter_system_files(Animia::get_open_files(i))) {
+				Filesystem::Path p(f);
+				for (const std::string& ext : media_extensions) {
+					if (p.Extension() == ext)
+						return p;
 				}
 			}
 		}