menukaonline / goindex-extended

A Google Drive Index, which has a lot of extra features, running on Cloudflare Workers.
https://demo.dudoo.workers.dev
MIT License
442 stars 252 forks source link

How to add Multiple Folder IDs instead of root #82

Closed onmgmedina closed 1 year ago

menukaonline commented 1 year ago

Have a look at 27th line in index.js,

Place the folder id instead of root in id: "root",.

If you need to add multiple roots (In your case, multiple folders), edit roots section like shown below:

// =================== ROOTS ===================
  "roots": [
    {
      id: "folder_id_1",
      name: "Personal Drive",
      // To enable password protection, uncomment the below code line(remove "//" in the front of the below code line)
      // auth: {'username_1' : 'password_1', 'username_2' : 'password_2'},
      protect_file_link: false //true or false
    },
    {
      id: "folder_id_2",
      name: "Personal Drive II",
      // To enable password protection, uncomment the below line
      // auth: {'username_1' : 'password_1', 'username_2' : 'password_2'},
      protect_file_link: false
    },
    {
        id: "folder_id_3",
        name: "Personal Drive III",
        // To enable password protection, uncomment the below line
        // auth: {'username_1' : 'password_1', 'username_2' : 'password_2'},
        protect_file_link: false
      },
  ],
  // =================== END OF ROOTS ===================  <-- DON'T REMOVE THIS LINE
onmgmedina commented 1 year ago

thanks man!