diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Winamp/ASXv2.cpp | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Winamp/ASXv2.cpp')
-rw-r--r-- | Src/Winamp/ASXv2.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Src/Winamp/ASXv2.cpp b/Src/Winamp/ASXv2.cpp new file mode 100644 index 00000000..e509d85a --- /dev/null +++ b/Src/Winamp/ASXv2.cpp @@ -0,0 +1,45 @@ +/** (c) Nullsoft, Inc. C O N F I D E N T I A L + ** Filename: + ** Project: + ** Description: + ** Author: Ben Allison benski@nullsoft.com + ** Created: + **/ +#include "main.h" + +void loadasxv2fn(const wchar_t *filename, int whattodo) +{ + if (PlayList_getlength()) + { + if (whattodo < 1) + PlayList_delete(); + } + + int i=1; + wchar_t ref[FILENAME_SIZE]; + wchar_t key[100]; + while (1) + { + StringCchPrintfW(key, 100, L"Ref%d", i++); + GetPrivateProfileStringW(L"Reference", key, L"?", ref, FILENAME_SIZE, filename); + if (!lstrcmpiW(ref, L"?")) + break; + else + { + if (!_wcsnicmp(ref, L"http://", 7)) + { + wchar_t *end = scanstr_backW(ref, L"/.", 0); + if (!end || *end == L'/') + { + if (wcschr(ref, L'?')) + StringCchCatW(ref, FILENAME_SIZE, L"&=.wma"); + else + StringCchCatW(ref, FILENAME_SIZE, L"?.wma"); + } + } + + PlayList_append(ref); + } + + } +}
\ No newline at end of file |