@@ -344,7 +344,7 @@ procedure TFormTrackerModify.MenuItemOnlineCheckSubmitNewTrackonClick(Sender: TO
344344 if SendStatus then
345345 begin
346346 // Succesful upload
347- PopupStr := format(' Successful upload of %d unique tracker URL' ,[TrackerSendCount]);
347+ PopupStr := format(' Successful upload of %d unique tracker URL' , [TrackerSendCount]);
348348 Application.MessageBox(
349349 PChar(@PopupStr[1 ]),
350350 ' ' , MB_ICONINFORMATION + MB_OK);
@@ -409,7 +409,15 @@ procedure TFormTrackerModify.MenuItemOnlineCheckDownloadNewTrackonClick(
409409function TFormTrackerModify.TrackerWithURLAndAnnounce (
410410 const TrackerURL: UTF8String): boolean;
411411begin
412- Result := ValidTrackerURL(TrackerURL) and TrackerURLWithAnnounce(TrackerURL);
412+ Result := ValidTrackerURL(TrackerURL);
413+ if Result then
414+ begin
415+ // Web Torrent does not have 'announce'
416+ if not WebTorrentTrackerURL(TrackerURL) then
417+ begin
418+ Result := TrackerURLWithAnnounce(TrackerURL);
419+ end ;
420+ end ;
413421end ;
414422
415423procedure TFormTrackerModify.MenuTrackersDeleteTrackersWithStatusClick (
@@ -1047,24 +1055,30 @@ function TFormTrackerModify.CopyUserInputNewTrackersToList: boolean;
10471055 if TrackerStr = ' ' then
10481056 continue;
10491057
1050- // All the tracker must end with '/announce'
1051- Result := TrackerURLWithAnnounce(TrackerStr);
1052- if not Result then
1058+ Result := ValidTrackerURL(TrackerStr);
1059+ if Result then
10531060 begin
1054- ErrorStr := ' ERROR: Tracker URL must end with /announce' ;
1055- // do not continue the for loop
1056- break;
1061+ // Web Torrent does not have 'announce'
1062+ if not WebTorrentTrackerURL(TrackerStr) then
1063+ begin
1064+ Result := TrackerURLWithAnnounce(TrackerStr);
1065+ if not Result then
1066+ begin
1067+ ErrorStr := ' ERROR: Tracker URL must end with /announce' ;
1068+ end ;
1069+ end ;
1070+ end
1071+ else
1072+ begin
1073+ ErrorStr := ' ERROR: Tracker URL must begin with http:// or udp://' ;
10571074 end ;
10581075
1059- // All the tracker must begin with 'http(s)://' or 'udp://'
1060- Result := ValidTrackerURL(TrackerStr);
10611076 if Result then
10621077 begin
10631078 AddButIngnoreDuplicates(FTrackerList.TrackerAddedByUserList, TrackerStr);
10641079 end
10651080 else
10661081 begin
1067- ErrorStr := ' ERROR: Tracker URL must begin with http:// or udp://' ;
10681082 // do not continue the for loop
10691083 break;
10701084 end ;
0 commit comments