.
This is for our network, and we want to allow music videos, but not full movies, I want the client to only list files that are below 75 meg.
I know it should be in the shareManager.cpp, and possibly in
"ShareManager::Directory* ShareManager::buildTree..."
But I can't seem to get it to work.. Can someone please point me in the right direction or pass along the proper code?
Thanks,
Bobby
Tech help
Moderator: Moderators
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Re: Tech help
ZPoc wrote:This is for our network, and we want to allow music videos, but not full movies, I want the client to only list files that are below 75 meg.
I know it should be in the shareManager.cpp, and possibly in
"ShareManager::Directory* ShareManager::buildTree..."
But I can't seem to get it to work.. Can someone please point me in the right direction or pass along the proper code?
Hola Bobby.
I'm sure one of the kind ops will move this to the Programmer's Help section
This'll probably do you just fine:
Code: Select all
--- ShareManager.cpp Tue Feb 25 18:32:54 2003
+++ ShareManager.cpp.mod.cpp Wed Feb 26 15:58:40 2003
@@ -250,11 +250,13 @@
// Not a directory, assume it's a file...make sure we're not sharing the setting
s file...
if(Util::stricmp(name.c_str(), "DCPlusPlus.xml") != 0 && name.find('$') == string::npos) {
+ if(((int64_t)data.nFileSizeLow | ((int64_t)data.nFileSizeHigh)<<32) <= 75 *1024*1024) {
dir->addSearchType(getMask(name));
dir->addType(getType(name));
dir->files[name] = (int64_t)data.nFileSizeLow | ((int64_t)data.nFileSizeHigh)<<32;
dir->size+=(int64_t)data.nFileSizeLow | ((int64_t)data.nFileSizeHigh)<<32;
}
+ }
}
}
} while(FindNextFile(hFind, &data));
I just copied the file size code from inside that if loop... it should work, but I haven't tested it. Your mileage may vary.
- Todd
-
aDe
- Forum Moderator
- Posts: 138
- Joined: 2003-01-07 14:14
- Location: SE
Re: Tech help
GargoyleMT wrote:I'm sure one of the kind ops will move this to the Programmer's Help section
alrite..
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-08 02:46
- Location: .pa.us
Re: Tech help
aDe wrote:GargoyleMT wrote:I'm sure one of the kind ops will move this to the Programmer's Help section
alrite..
PS. Thank you!
Who is online
Users browsing this forum: Google [Bot] and 0 guests