Jump to content

physiltant

Member
  • Posts

    15
  • Joined

  • Last visited

Posts posted by physiltant

  1. 12 hours ago, vitor said:

    New version. This one if for everyone.


    Do force a cache rebuild via :gdrebuildcache before using, because there are changes there and I need confirmation if it can handle large numbers of files.


    Files are now added to the cache based on access date, and when searching only the top 100 matches will show. This is configurable via a new Workflow Environment Variable, and the lower the number, the faster results will return.


    It also fixes the case mentioned above where too many files were showing.

     

    Amazing! Much faster (still 2-5 seconds for some searches but it's good enough for me and I think I just have too many files) and no longer freezes. Results are much more intuitive and relevant now as well. Thank you!

  2. 3 hours ago, vitor said:

    @physiltant Try this new version and do a :gdrebuildcache. See if that works to build the cache.txt file. Everyone else can skip this version, though if you switch to it everything else will work the same.

     

    Great so the cache.txt seems to get built out just fine from what I can see (I can't check every line cos I have thousands of files but it looks OK at a glance), and results show up.

     

    However, the actual search has some issues. For folders with a smaller number of files, all seems fine and consistent (though the order of results is questionable and non-intuitive). But for folders with lots of files, it's not very consistent or quick: e.g. searching the same thing 3 times delivered 3 different sets of results (one of which was no results at all) - though I can't replicate this again so it was probably just the first couple of times for that search. For larger folders it also takes a few seconds (up to 10-15 seconds), and often freezes (rainbow wheel) - this I've replicated a few times. For me personally right now this is an issue because I use my Bookshelf folder (formerly Library) a lot and it has a lot of files so this will mean freezing often, but I think for many others with smaller folders this is a perfect solution, at least temporarily.

     

    Again, it goes without saying we all massively appreciate your work. The above isn't a complaint, it's just feedback!

     

    EDIT:


    Additional point RE results. So using "Bookshelf" as an example, when your latest version does eventually list results, it seems to list the Bookshelf folder and then EVERYTHING in that folder (hundreds of files) even if the file does not have "Bookshelf" in it, which of course isn't desirable. Your original version (before the caching feature) is therefore actually quicker for this keyword and presents better results for my Bookshelf folder (it just shows files/folders with the actual keyword in it). This applies to other searches as well: it shows any folders with the keyword in it and then ALL constituent files even if they don't have the keyword in it - whereas it's best to only show files with the keyword in it.

  3. 6 minutes ago, vitor said:

    Run :gdrebuildcache once. What does the debugger say? Wait until you get the notification and try another search.

     

    How long does the notification take? It's been a couple of minutes and I haven't seen one. This is what the debugger says anyway:

     

    [00:47:20.327] Google Drive[Keyword] Processing complete
    [00:47:20.331] Google Drive[Keyword] Passing output '' to Arg and Vars
    [00:47:20.331] Google Drive[Arg and Vars] Processing complete
    [00:47:20.332] Google Drive[Arg and Vars] Passing output '' to Run Script
    [00:47:20.494] Google Drive[Run Script] Processing complete
    [00:47:20.499] Google Drive[Run Script] Passing output '{"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    ' to Conditional
    [00:47:20.499] Google Drive[Conditional] Processing complete
    [00:47:20.500] Google Drive[Conditional] Passing output '{"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    ' to Post Notification

     

    7 minutes ago, vitor said:

    Check the file at ~/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.vitorgalvao.alfred.googledrive/cache.txt. Does it exist? Does it contain a list of you Google Drive Files?

     

    Yes the cache.txt file exists via that path but no it is blank

     

    9 minutes ago, vitor said:

    Also, are you sure your Google Drive directory is at /Volumes/GoogleDrive/My Drive?

     

    Very sure

  4. 4 minutes ago, vitor said:

     

    No, that would have no relation.

     

    What does the debugger (set the log output to “All Information”) say?

     

    I ran a couple of searches. Here's what it outputted. Sorry if I've not done it properly.

     

    [00:32:26.595] Logging Started...
    [00:33:16.161] Google Drive[Script Filter] Queuing argument 'd'
    [00:33:16.250] Google Drive[Script Filter] Queuing argument 'de'
    [00:33:16.386] Google Drive[Script Filter] Queuing argument 'dee'
    [00:33:16.411] Google Drive[Script Filter] Script with argv 'de' finished
    [00:33:16.412] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:16.452] Google Drive[Script Filter] Queuing argument 'deen'
    [00:33:16.611] Google Drive[Script Filter] Script with argv 'deen' finished
    [00:33:16.611] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:21.675] Google Drive[Script Filter] Queuing argument 'l'
    [00:33:21.783] Google Drive[Script Filter] Script with argv 'l' finished
    [00:33:21.785] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:22.799] Google Drive[Script Filter] Queuing argument 'b'
    [00:33:22.865] Google Drive[Script Filter] Queuing argument 'bo'
    [00:33:23.003] Google Drive[Script Filter] Queuing argument 'boo'
    [00:33:23.024] Google Drive[Script Filter] Script with argv 'bo' finished
    [00:33:23.031] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:23.136] Google Drive[Script Filter] Queuing argument 'book'
    [00:33:23.186] Google Drive[Script Filter] Script with argv 'boo' finished
    [00:33:23.195] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:23.347] Google Drive[Script Filter] Script with argv 'book' finished
    [00:33:23.358] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:23.768] Google Drive[Script Filter] Queuing argument 'books'
    [00:33:23.856] Google Drive[Script Filter] Queuing argument 'booksh'
    [00:33:23.945] Google Drive[Script Filter] Queuing argument 'bookshe'
    [00:33:24.059] Google Drive[Script Filter] Queuing argument 'bookshel'
    [00:33:24.105] Google Drive[Script Filter] Script with argv 'bookshe' finished
    [00:33:24.117] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:24.125] Google Drive[Script Filter] Queuing argument 'bookshelf'
    [00:33:24.285] Google Drive[Script Filter] Script with argv 'bookshelf' finished
    [00:33:24.300] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:34.837] Google Drive[Script Filter] Queuing argument 'm'
    [00:33:34.949] Google Drive[Script Filter] Queuing argument 'my'
    [00:33:35.005] Google Drive[Script Filter] Script with argv 'm' finished
    [00:33:35.021] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:35.038] Google Drive[Script Filter] Queuing argument 'my '
    [00:33:35.129] Google Drive[Script Filter] Queuing argument 'my d'
    [00:33:35.196] Google Drive[Script Filter] Queuing argument 'my dr'
    [00:33:35.241] Google Drive[Script Filter] Queuing argument 'my dri'
    [00:33:35.376] Google Drive[Script Filter] Queuing argument 'my driv'
    [00:33:35.404] Google Drive[Script Filter] Script with argv 'my dri' finished
    [00:33:35.405] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:35.443] Google Drive[Script Filter] Queuing argument 'my drive'
    [00:33:35.604] Google Drive[Script Filter] Script with argv 'my drive' finished
    [00:33:35.624] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:58.509] Google Drive[Script Filter] Queuing argument 'f'
    [00:33:58.596] Google Drive[Script Filter] Queuing argument 'fi'
    [00:33:58.757] Google Drive[Script Filter] Queuing argument 'fin'
    [00:33:58.783] Google Drive[Script Filter] Script with argv 'fi' finished
    [00:33:58.784] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:58.824] Google Drive[Script Filter] Queuing argument 'fina'
    [00:33:58.911] Google Drive[Script Filter] Queuing argument 'finan'
    [00:33:58.979] Google Drive[Script Filter] Queuing argument 'financ'
    [00:33:59.024] Google Drive[Script Filter] Queuing argument 'finance'
    [00:33:59.183] Google Drive[Script Filter] Queuing argument 'finances'
    [00:33:59.207] Google Drive[Script Filter] Script with argv 'finance' finished
    [00:33:59.208] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}
    [00:33:59.355] Google Drive[Script Filter] Script with argv 'finances' finished
    [00:33:59.381] Google Drive[Script Filter] {"items":[{"title":"Nothing found","subtitle":"Try searching something else"}]}

     

  5. 1 hour ago, vitor said:

     

    Great! It will be on GitHub, yes, and it will have it’s own forum post. Just need to write the README, fill the URL in the Workflow, and add the auto update. I’ll post here when that happens.

     

    @physiltant Use :gdlaunchd to remove the agent, then run it again to install the agent, and wait a bit (you have a lot of files). Then try again.

     

    Thanks for the reply. It's been just over 30m and still nothing..

     

    Note that, to emulate a brand new user, I fully uninstalled both Google Drive and Alfred, restarted my Macbook, reinstalled Alfred + Powerpack, then reinstalled Google Drive from scratch, then waited 30m (just in case), then installed the workflow, removed the agent and reinstalled it as instructed, waited another 30m, and it's still not finding anything at all. Can anyone else replicate this? I wonder if it only works for those who used your older versions first (which might have done some indexing or whatever that's helped your latest version work). Anyway I'll wait another 30m and see if anything happens. Thanks for all your efforts.

  6. 12 minutes ago, vitor said:

     

    Should be fixed in the new one. Also added a :gdlaunchd which you only need to run once and it will add a launchd agent that will rebuild your cache every hour.

     

    Looking forward to trying this. It's not working at the moment but I think it's because I just reinstalled Google Drive so I have to wait a little for it to load files or something and I should try again later - is that right?

  7. 3 minutes ago, physiltant said:

    (Also not sure why Alfred is suddenly showing results without the use of a workflow - yesterday it wasn't finding anything by itself at all!)

     

    Ok all of a sudden Alfred is working absolutely fine by itself (bar the "Library" issue - which only your workflow solved). I have disabled all workflows. What's happened?

  8. 5 minutes ago, vitor said:

    Could be worse, but still long. I’m thinking of saving the full file list to a file to make it faster to search.

     

    Great. One nitpicky thing maybe to consider for the final version: I changed the keyword to ' (which I assume many will want to eventually do), but it shows duplicate results (I assume one from the standard search and one from your workflow). See example below. (Also not sure why Alfred is suddenly showing results without the use of a workflow - yesterday it wasn't finding anything by itself at all!)

     

    image.thumb.png.3a326c42fd39c668dd97d1f07b63156c.png

  9. 22 hours ago, vitor said:

    @Yiching @physiltant What you’re both reporting has already been discussed in this thread and others. We’re all aware of the problems; repeating them without new information makes the conversation harder to follow.


    If you can answer my questions and try the solutions, perhaps we’ll be able to get new insights. What’s needed now is focus on what might work.

     

    Running 

    ls -R "/Volumes/GoogleDrive/My Drive"

    reveals everything as expected.

     

    I tried your workflow as well and it leaves me hanging like the others (I have almost 1 TB of files, Google Drive is in the default location, I have a MBP 16", I waited over 30m)

     

    I have a couple more behaviours to report if it adds any insight (remember I am using this workflow:

     

    1. I noticed that files if files show up as having synced (even if "online only") in the menu icon window (see below), they'll show up in an Alfred search. Before syncing they don't show up in Alfred's search.

     

    telegram-cloud-photo-size-2-5249100045108754077-x.jpg.4ebf57ae7b26f640e96317d2f1bc6dfd.jpg

     

    2. I also noticed that there is one folder that is stubbornly refusing to show up in search: a folder called "Library" which has a bunch of folders and PDFs. Alfred seems to have an issue with the word "Library". When I rename this Library folder to anything else, it doesn't work. If I create a new folder called "Library", it doesn't work. However, if I create a *new folder* called Library OLD (or anything else), it shows up as synced in the menu bar (as above) and shows up in search. If I then rename this new folder to "Library" instead of "Library OLD" or "Libraryyy", it stays synced, but Alfred will pretend it's not called "Library". See below. Notice how the path is to "Library" as it should be, but it still calls it "Libraryyy" in search. Renaming this new folder to anything but "Library" is absolutely fine. This was my only problematic folder (as far as I've noticed so far), so I guess for me I now have a fix: create a new folder that is not called Library, and copy all my files into this new folder. This seems to work for now.

     

    image.thumb.png.a08b872ddbf07b35696c4a94005a71b5.png

     

    EDIT: OK I can't rename it back to Library. Only the parent "Library" folder will show up in search (with the wrong name but correct path), but none of its constituent files sync. I have to rename it to something else for it and its constituent files to sync.

  10. So initially Alfred just found nothing. I then installed this workflow which seems to solve things for the most part. Now the behaviour I'm experiencing is that some files/folders simply aren't being found by Alfred, even when I make them available for offline access. Many other files are being found fine, even if online only. I've added the Volumes/GoogleDrive to the search scope. Troubleshooting File Search in Alfred doesn't reveal anything. Even mdutil -i on /Volumes/GoogleDrive via Terminal doesn't make a difference. It all seems a bit arbitrary, and is very frustrating. I can't even revert to Backup & Sync which was perfectly fine for me.

×
×
  • Create New...