Skip to content
Permalink
Browse files
set title of metadata
  • Loading branch information
gene9831 committed Feb 28, 2022
1 parent e877b4d commit cd86a43039142cfff71b0ead4cdba5f4f6fbf7f3
Showing 1 changed file with 13 additions and 2 deletions.
@@ -1,5 +1,5 @@
/*
YouTube media parse
Aliyun drive media parse
*/

// void OnInitialize()
@@ -57,6 +57,17 @@ string PlayitemParse(const string &in path, dictionary &MetaData, array<dictiona

HostSetUrlHeaderHTTP(path, header);

HostPrintUTF8(path);
int index = path.findFirst("filename");
array<string> substrs = path.substr(index).split("&");

if (substrs.length() == 0) {
return path;
}

string filename = HostUrlDecode(HostUrlDecode(substrs[0]).substr(17));

MetaData['title'] = filename;
HostPrintUTF8(filename);

return path;
}

0 comments on commit cd86a43

Please sign in to comment.