Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1016309 // installOrUpdateYouTubeDL

JavaX fragment (include)

1  
static File installOrUpdateYouTubeDL() {
2  
  File file = youTubeDLExecutable();
3  
  if (!file.exists()) ret forceInstallYouTubeDL();
4  
  pcall {
5  
    /*if (fileOlderThanNDays(file, 7))
6  
      ret forceInstallYouTubeDL();*/
7  
      
8  
    S newVersion = loadPage("https://rg3.github.io/youtube-dl/update/LATEST_VERSION");
9  
    File versionFile = javaxCodeDir("youtube-dl/youtube-dl.version");
10  
    if (!eq(newVersion, loadTextFile(versionFile))) {
11  
      print("Found new youtube-dl version: " + newVersion);
12  
      saveTextFile(versionFile, newVersion);
13  
      ret forceInstallYouTubeDL();
14  
    }
15  
  }
16  
  ret file;
17  
}

Author comment

Began life as a copy of #1006747

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016309
Snippet name: installOrUpdateYouTubeDL
Eternal ID of this version: #1016309/12
Text MD5: ff17ab06851ef2d80c808ae2fbc28120
Author: stefan
Category: javax / video
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-08 22:18:34
Source code size: 612 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 430 / 469
Version history: 11 change(s)
Referenced in: [show references]