Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
r57zone committed Aug 27, 2016
1 parent 41f5d02 commit 7a2b86c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Downloaded.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
14 changes: 7 additions & 7 deletions Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -321,22 +321,22 @@ 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));
end;
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;
Expand Down
20 changes: 10 additions & 10 deletions Unit2.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -28,18 +28,18 @@ object Settings: TSettings
end
object CancelBtn: TButton
Left = 88
Top = 219
Top = 283
Width = 75
Height = 25
Caption = #1054#1090#1084#1077#1085#1072
TabOrder = 1
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
Expand All @@ -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
Expand Down

0 comments on commit 7a2b86c

Please sign in to comment.