From 7a2b86c784668c8b0726744070f6b1f638cd0567 Mon Sep 17 00:00:00 2001 From: r57zone Date: Sat, 27 Aug 2016 18:25:32 +0400 Subject: [PATCH] update --- Downloaded.txt | 2 +- Unit1.pas | 14 +++++++------- Unit2.dfm | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Downloaded.txt b/Downloaded.txt index 4ea579a..5ca737e 100644 --- a/Downloaded.txt +++ b/Downloaded.txt @@ -39,6 +39,7 @@ http://cdn.radio-t.com/rt_podcast505.mp3 http://cdn.radio-t.com/rt_podcast506.mp3 http://cdn.radio-t.com/rt_podcast507.mp3 http://cdn.radio-t.com/rt_podcast508.mp3 +http://cdn.radio-t.com/rt_podcast509.mp3 http://cdn.radio-t.com/rt373post.mp3 http://cdn.radio-t.com/rt374post.mp3 http://cdn.radio-t.com/rt377post.mp3 @@ -59,4 +60,3 @@ http://cdn.radio-t.com/rt487post.mp3 http://cdn.radio-t.com/rt490post.mp3 http://cdn.radio-t.com/rt492post.mp3 http://cdn.radio-t.com/rt494post.mp3 -http://cdn.radio-t.com/rt_podcast509.mp3 diff --git a/Unit1.pas b/Unit1.pas index 1389c87..ac738b8 100644 --- a/Unit1.pas +++ b/Unit1.pas @@ -213,7 +213,7 @@ function DownloadFile(const FileUrl, Path: string): boolean; end else begin FileExistsCounter:=1; while true do begin - cFileName:=ExtractFileName(StringReplace(Copy(FileUrl,1,Length(FileUrl)-4), '/', '\', [rfReplaceAll]))+'('+IntToStr(FileExistsCounter)+')'+ExtractFileExt(FileUrl); + cFileName:=ExtractFileName(StringReplace(Copy(FileUrl, 1, Length(FileUrl)-4), '/', '\', [rfReplaceAll]))+'('+IntToStr(FileExistsCounter)+')'+ExtractFileExt(FileUrl); if not FileExists(Path+cFileName) then begin SyncList.Add(Path+cFileName); //Standard modular program AssignFile(F, Path+cFileName); @@ -222,7 +222,7 @@ function DownloadFile(const FileUrl, Path: string): boolean; inc(FileExistsCounter); end; end; - Rewrite(F,1); + Rewrite(F, 1); repeat InternetReadFile(hUrl, @Buffer, SizeOf(Buffer), BufferLen); BlockWrite(F, Buffer, BufferLen); @@ -267,8 +267,8 @@ function FindWindowExtd(PartialTitle: string): HWND; while hWndTemp<>0 do begin iLenText:=GetWindowText(hWndTemp, cTitletemp, 255); sTitleTemp:=cTitletemp; - sTitleTemp:=UpperCase(Copy(sTitleTemp, 1, iLenText)); - PartialTitle:=UpperCase(partialTitle); + sTitleTemp:=AnsiUpperCase(Copy(sTitleTemp, 1, iLenText)); + PartialTitle:=AnsiUpperCase(partialTitle); if Pos(partialTitle, sTitleTemp)<>0 then Break; hWndTemp:=GetWindow(hWndTemp, GW_HWNDNEXT); @@ -321,14 +321,14 @@ procedure TMain.RefreshBtnClick(Sender: TObject); //Ссылка на mp3 файл / Link to mp3 file MyLink:=Copy(GetRss.Strings[j],Pos('URL="',AnsiUpperCase(GetRss.Strings[j]))+5,Pos('.MP3',AnsiUpperCase(GetRss.Strings[j]))-Pos('URL="',AnsiUpperCase(GetRss.Strings[j]))-1); - if (Copy(UpperCase(MyLink),1,7)='HTTP://') or (Copy(UpperCase(MyLink),1,8)='HTTPS://') then + if (Copy(UpperCase(MyLink), 1, 7)='HTTP://') or (Copy(UpperCase(MyLink), 1, 8)='HTTPS://') then //Проверяем ссылку на наличие в ее списке загруженных подкастов и на возмоможность загрузки / Check presence of link on list of downloaded podcasts and the ability to download if (Pos(MyLink,Downloaded.Text)=0) and (CheckUrl(MyLink)=true) then //Проверяем не добавлена ли она уже в список загрузки / Check if it is added in the download list if (Pos(MyLink,Download.Text)=0) then begin - StatusBar1.SimpleText:=' '+FoundNewPodcastTitle+' '+Copy(MemoRssList.Lines.Strings[i],1,20)+'...'; + StatusBar1.SimpleText:=' '+FoundNewPodcastTitle+' '+Copy(MemoRssList.Lines.Strings[i], 1, 20)+'...'; //Добавление ссылки в список для загрузки / Add link to download list Download.Add(Copy(GetRss.Strings[j],Pos('URL="',AnsiUpperCase(GetRss.Strings[j]))+5,Pos('.MP3',AnsiUpperCase(GetRss.Strings[j]))-Pos('URL="',AnsiUpperCase(GetRss.Strings[j]))-1)); @@ -336,7 +336,7 @@ procedure TMain.RefreshBtnClick(Sender: TObject); end; end; - //Список загрузки / Download list + //Загрузка файлов / Download files if Download.Count>0 then begin //Стандарт модульных программ / Standart modular program - https://github.com/r57zone/Standard-modular-program SyncList:=TStringList.Create; diff --git a/Unit2.dfm b/Unit2.dfm index b306eb5..098facd 100644 --- a/Unit2.dfm +++ b/Unit2.dfm @@ -4,8 +4,8 @@ object Settings: TSettings BorderIcons = [biSystemMenu] BorderStyle = bsSingle Caption = #1053#1072#1089#1090#1088#1086#1081#1082#1080 - ClientHeight = 251 - ClientWidth = 391 + ClientHeight = 316 + ClientWidth = 296 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -19,7 +19,7 @@ object Settings: TSettings TextHeight = 13 object OkBtn: TButton Left = 8 - Top = 219 + Top = 283 Width = 75 Height = 25 Caption = #1054#1082 @@ -28,7 +28,7 @@ object Settings: TSettings end object CancelBtn: TButton Left = 88 - Top = 219 + Top = 283 Width = 75 Height = 25 Caption = #1054#1090#1084#1077#1085#1072 @@ -36,10 +36,10 @@ object Settings: TSettings OnClick = CancelBtnClick end object GroupBox1: TGroupBox - Left = 296 - Top = 8 - Width = 89 - Height = 89 + Left = 8 + Top = 216 + Width = 281 + Height = 60 Caption = 'OPML ' TabOrder = 2 object ImportBtn: TButton @@ -52,8 +52,8 @@ object Settings: TSettings OnClick = ImportBtnClick end object ExportBtn: TButton - Left = 6 - Top = 56 + Left = 86 + Top = 24 Width = 75 Height = 25 Caption = #1069#1082#1089#1087#1086#1088#1090