Jump to content

Vinay W

Member
  • Posts

    23
  • Joined

  • Last visited

Posts posted by Vinay W

  1. @vitor thanks for taking the time to answer. Appreciate it. 

     

    Just to confirm if i understand the reasoning behind your suggestion to use python3 (instead of fully qualified `/usr/bin/python3`):
    - so we're basically betting on the user not messing with the `PATH` (and keeping python3 on it) 
    - ... instead of a situation where apple removes the shim -> Alfred users having to install python3 themselves and the path could differ depending on the manual installation method?

    In that case, i'm leaning towards going with `/usr/bin/python3` (instead of `python3`) because that is most certain to work right now with the least friction for most users. And update if/when the time comes.

     

    Another Side question : In case you know, have we ever considered bundling a python environment with the Alfred app? Since many workflows rely on it? Especially now with the bundling mess?

     

     

  2. Hello @designjoe

    I'm working on this. Here's an updated version of the workflow that uses python3 that seems to be working for me but doesn't work for another user. Would you mind giving it a go? 

     

    You can follow the progress on this GitHub issue https://github.com/vinaywadhwa/justwatch-alfred/issues/8

    @vitor could use some help, if you'd be kind enough to take a look at the discussion in the GitHub issue.

  3. 16 hours ago, edbro said:

    Yes, 100% for Unbelievable. If I type slowly, I get hits on "U", more hits on "UN" and it errors when I get to "UNB".

     

    Thanks! Found the problem and it's fixed. 

    You can wait for the workflow to auto-update (in max 2 days) or get the latest release (1.0.5, for now) from here https://github.com/vinaywadhwa/justwatch-alfred/releases .

     

    If you are interested in more details

    - The "API" this workflow uses (justwatch) sends some bad data for some titles. 

    - The workflow now expects and handles the bad data better in the latest release (1.0.5, just released), all thanks to your report 👏🏼 

     

     

  4. 1 hour ago, edbro said:

    I sometimes get the following error: ( btw, I renamed the keyword)

    1402714041_ScreenShot2020-05-10at9_45_10AM.jpg.fcae4f85db74cff48d3ce8fb88ebfac6.jpg

     

    
    [09:46:59.488] JustWatch - Alfred[Script Filter] Queuing argument 'unbel'
    [09:46:59.955] JustWatch - Alfred[Script Filter] Queuing argument 'unbeli'
    [09:47:00.774] JustWatch - Alfred[Script Filter] Script with argv '(null)' finished
    [09:47:00.778] ERROR: JustWatch - Alfred[Script Filter] Code 1: 09:47:00 workflow.py:1695 DEBUG    loading cached data: /Users/eds/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.vwap.justwatch/__workflow_latest_version.cpickle
    .
    09:47:00 workflow.py:2061 DEBUG    ---------- JustWatch - Alfred (1.0.4) ----------
    09:47:00 workflow.py:1468 DEBUG    reading settings from /Users/eds/Library/Application Support/Alfred/Workflow Data/com.vwap.justwatch/settings.json
    09:47:00 workflow.py:2343 DEBUG    update check not due
    09:47:00 connectionpool.py:941 DEBUG    Starting new HTTPS connection (1): apis.justwatch.com:443
    09:47:00 connectionpool.py:442 DEBUG    https://apis.justwatch.com:443 "GET /content/locales/state HTTP/1.1" 200 None
    09:47:00 connectionpool.py:442 DEBUG    https://apis.justwatch.com:443 "GET /content/providers/locale/en_US HTTP/1.1" 200 None
    09:47:00 connectionpool.py:442 DEBUG    https://apis.justwatch.com:443 "POST /content/titles/en_US/popular HTTP/1.1" 200 None
    09:47:00 workflow.py:2080 ERROR    'original_release_year'
    Traceback (most recent call last):
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/workflow/workflow.py", line 2073, in run
        func(self)
      File "main.py", line 127, in main
        media_items = MediaItems(just_watch, sys.argv[len(sys.argv) - 1], providers).get_alfred_json_list()
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/media_items.py", line 14, in __init__
        media_item = MediaItem(media_item, providers)
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/media_item.py", line 22, in __init__
        self.parse(media_item_data)
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/media_item.py", line 29, in parse
        self.original_release_year = media_item['original_release_year']
    KeyError: 'original_release_year'
    09:47:00 workflow.py:2103 DEBUG    ---------- finished in 0.651s ----------
    [09:47:00.783] JustWatch - Alfred[Script Filter] {"items": [{"valid": false, "subtitle": "'original_release_year'", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"}, "title": "Error in workflow 'JustWatch - Alfred'"}]}
    [09:47:01.079] JustWatch - Alfred[Script Filter] Queuing argument 'unbelieva'
    [09:47:01.676] JustWatch - Alfred[Script Filter] Queuing argument 'unbelievab'
    [09:47:02.468] JustWatch - Alfred[Script Filter] Script with argv '(null)' finished
    [09:47:02.484] ERROR: JustWatch - Alfred[Script Filter] Code 1: 09:47:01 workflow.py:1695 DEBUG    loading cached data: /Users/eds/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.vwap.justwatch/__workflow_latest_version.cpickle
    .
    09:47:01 workflow.py:2061 DEBUG    ---------- JustWatch - Alfred (1.0.4) ----------
    09:47:01 workflow.py:1468 DEBUG    reading settings from /Users/eds/Library/Application Support/Alfred/Workflow Data/com.vwap.justwatch/settings.json
    09:47:01 workflow.py:2343 DEBUG    update check not due
    09:47:01 connectionpool.py:941 DEBUG    Starting new HTTPS connection (1): apis.justwatch.com:443
    09:47:02 connectionpool.py:442 DEBUG    https://apis.justwatch.com:443 "GET /content/locales/state HTTP/1.1" 200 None
    09:47:02 connectionpool.py:442 DEBUG    https://apis.justwatch.com:443 "GET /content/providers/locale/en_US HTTP/1.1" 200 None
    09:47:02 connectionpool.py:442 DEBUG    https://apis.justwatch.com:443 "POST /content/titles/en_US/popular HTTP/1.1" 200 None
    09:47:02 workflow.py:2080 ERROR    'original_release_year'
    Traceback (most recent call last):
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/workflow/workflow.py", line 2073, in run
        func(self)
      File "main.py", line 127, in main
        media_items = MediaItems(just_watch, sys.argv[len(sys.argv) - 1], providers).get_alfred_json_list()
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/media_items.py", line 14, in __init__
        media_item = MediaItem(media_item, providers)
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/media_item.py", line 22, in __init__
        self.parse(media_item_data)
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/media_item.py", line 29, in parse
        self.original_release_year = media_item['original_release_year']
    KeyError: 'original_release_year'
    09:47:02 workflow.py:2103 DEBUG    ---------- finished in 0.628s ----------
    [09:47:02.487] JustWatch - Alfred[Script Filter] {"items": [{"valid": false, "subtitle": "'original_release_year'", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"}, "title": "Error in workflow 'JustWatch - Alfred'"}]}
    [09:47:02.547] JustWatch - Alfred[Script Filter] Queuing argument 'unbelievable'
    [09:47:03.337] JustWatch - Alfred[Script Filter] Script with argv '(null)' finished
    [09:47:03.360] ERROR: JustWatch - Alfred[Script Filter] Code 1: 09:47:02 workflow.py:1695 DEBUG    loading cached data: /Users/eds/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.vwap.justwatch/__workflow_latest_version.cpickle
    .
    09:47:02 workflow.py:2061 DEBUG    ---------- JustWatch - Alfred (1.0.4) ----------
    09:47:02 workflow.py:1468 DEBUG    reading settings from /Users/eds/Library/Application Support/Alfred/Workflow Data/com.vwap.justwatch/settings.json
    09:47:02 workflow.py:2343 DEBUG    update check not due
    09:47:02 connectionpool.py:941 DEBUG    Starting new HTTPS connection (1): apis.justwatch.com:443
    09:47:02 connectionpool.py:442 DEBUG    https://apis.justwatch.com:443 "GET /content/locales/state HTTP/1.1" 200 None
    09:47:03 connectionpool.py:442 DEBUG    https://apis.justwatch.com:443 "GET /content/providers/locale/en_US HTTP/1.1" 200 None
    09:47:03 connectionpool.py:442 DEBUG    https://apis.justwatch.com:443 "POST /content/titles/en_US/popular HTTP/1.1" 200 None
    09:47:03 workflow.py:2080 ERROR    'original_release_year'
    Traceback (most recent call last):
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/workflow/workflow.py", line 2073, in run
        func(self)
      File "main.py", line 127, in main
        media_items = MediaItems(just_watch, sys.argv[len(sys.argv) - 1], providers).get_alfred_json_list()
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/media_items.py", line 14, in __init__
        media_item = MediaItem(media_item, providers)
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/media_item.py", line 22, in __init__
        self.parse(media_item_data)
      File "/Users/eds/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.52877B56-0137-4595-B8B0-0478E05268F4/media_item.py", line 29, in parse
        self.original_release_year = media_item['original_release_year']
    KeyError: 'original_release_year'
    09:47:03 workflow.py:2103 DEBUG    ---------- finished in 0.628s ----------
    [09:47:03.363] JustWatch - Alfred[Script Filter] {"items": [{"valid": false, "subtitle": "'original_release_year'", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"}, "title": "Error in workflow 'JustWatch - Alfred'"}]}

     

     

    Seems like the API the workflow uses is glitching sometimes. Are you able to consistently reproduce it for a specific movie/tv-show name?

     

    It fails 💯 percent of the times for "unbelievable" for you? 

  5. 4 minutes ago, deanishe said:

    @Vinay W I don't know if this is useful, but Alfred-Workflow has its own lightweight version of requests that you could probably use instead of bundling several megabytes of libraries.

     

    I learnt that while researching the forums while building this workflow. Pretty cool.

    Couldn't use it because i was not using the requests library myself. Its a dependency for a 3rd party library this workflow uses. Didn't want to go through the trouble of rewriting the library itself. Also, the total size of my workflow is 1MB which seemed reasonable.

     

    Would consider using this lightweight version in the next one. Thanks! 

  6.  

    @shadyabhi Great. Glad you like it. 

     

    @Bemawr

    I guess i missed some other dependency. Still trying to wrap my head around packaging alfred workflows. Noob Alert 🙂

     

    Did you try deleting and reinstalling the new version? That might fix it, since its working for some people? Let me know how that goes. 

     

    I'll try to figure it out. Maybe @deanishe can help speed things up. Lets see. Watch this space. 

  7. Just Watch - Alfred Workflow

    Alfred workflow to easily find where to stream your movies/tv-shows. Based on an unofficial JustWatch API.

     

    Just Watch - Alfred | Demo

     Features

    • Find where to stream your favourite movies and tv shows in an instant.
    • No more logging into each of Netflix, Prime Video et al to check where a movie or tv-show is available.
    • Search by region. Default region: AU (see instructions below to setup your region)
    • Quick look - to enlarge movie posters or preview listing urls.

     Install

     

    P.S.: You need to buy the Powerpack to use this workflow.

    🛠 Setup:

    • Set your Country Code in the workflow variables.
    • Default country code/locale : AU

     

    ..and that's it. Start discovering right away!

    👬 Contribution

    • Report issues
    • Open pull request with improvements
    • Spread the word
    • Reach out with any feedback Twitter Contact

     

     

    PS: Thanks to @deanishe for the workflow libs and thumbnail loading ideas. 

  8. Go Incognito/Private - Alfred Workflow

    Re-Open current browser tab in Incognito/Private mode with a keyboard shortcut.

    Logo

    Install

    P.S.: You need to buy the Powerpack to use this workflow.

    Supported Browsers

    • Safari
    • Google Chrome
    • Google Chrome Canary
    • Opera
    • Vivaldi
    • Brave Browser

    Note

    • Firefox not supported, for now, sorry! This is why.
    • Please reach out if you need other Chrome/Safari based browsers supported.
  9. @JJJJ 

    • I re-wrote the whole thing in a way that works more reliably across different browsers (Technical details - using JXA instead of AppleScript now, as suggested here)
    • Should work for you now. If you are still interested, give the latest version a try (v1.0.2, as of now) and let me know if it works. 
    • Thanks for letting me know about this.
    • Also updated the original post

     

    @deanishe 

    • i will post the code on github soon. 
    • Getting the hang of how i should structure my workflows. This discussion helps. Thanks!
  10. Sorry, I'm not sure what's wrong then. 

     

    Here's a demo of me trying to do what you are (probably) doing - Download, install & run in all 3 browsers that the workflow supports - Safari, Google Chrome & Brave. See if you are doing the same thing?

    (i'll leave here as a demo for future users)

     

    Demo - https://imgur.com/oSbmaPK
     

    If it still doesn't work, it probably has something to do with the browser versions we are using (I'm on Catalina 10.15.3, Safari 13.0.5, Chrome 81.0.4044.122, Brave 1.5.123)

  11. Google Account Switcher - Alfred Workflow

    An Alfred workflow to switch between Google/GSuite accounts on Google websites (Gmail, Drive, Calendar) with keyboard shortcuts.

     

     Features

    • Supports switching between upto 3 Google accounts with keyboard shortcuts (configurable)
    • Supports Gmail, Drive & Calendar but may support other google apps as well, try it!

     Install

    P.S.: You need to buy the Powerpack to use this workflow.

    🛠 Setup:

    Setup the accounts: Setup the google accounts in environment variables like :

    Then, setup the keyboard shortcuts for each of the accounts, say

    ..and that's it. Use these shortcuts to switch between google accounts on gmail/google-drive/google-calendar websites in the browser's active tab.

    🌐 Supported Browsers

    • Safari
    • Google Chrome
    • Google Chrome Canary
    • Opera
    • Vivaldi
    • Brave Browser

    🗒 Note

    • You must be logged in with the aforementioned accounts already. Which of the 3 accounts you log into first has no effect on the way the workflow functions.
    • The 'active' tab in the browser must have the gmail/drive/calendar website opened for the keyboard shortcuts to work.
    • Firefox not supported, for now, sorry! This is why.
    • Please reach out if you need other Chrome/Safari based browsers supported.

    👬 Contribution

    • Report issues
    • Open pull request with improvements
    • Spread the word
    • Reach out with any feedback Twitter Follow

     

  12. Go Home, Alfred

    An Alfred workflow which enables you to use a keyboard shortcut to go to the homepage of a website you are on.

     

    Do you often get stuck deep inside the rabbit hole (of a website) and come out by either 

    • backspacing the URL a gazillion times to go to the home page 
    • or by clicking the website logo usually on the top left

    UGHH! make it a keyboard shortcut with this Alfred workflow!

    Install

    P.S.: You need to buy the Powerpack to use this workflow.

    Supported Browsers

    • Safari
    • Google Chrome
    • Google Chrome Canary
    • Opera
    • Vivaldi
    • Brave Browser

    Note

    • Firefox not supported, for now, sorry! This is why.
    • Please reach out if you need other Chrome/Safari based browsers supported.
×
×
  • Create New...