vitor Posted June 17, 2019 Author Share Posted June 17, 2019 Update. Allow quicklook on files and streams. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted July 30, 2019 Author Share Posted July 30, 2019 Several updates. Change: Playing without marking as watched now uses ⌃ instead of ⌘. New: ⌘↵ marks as watched (and trashes) without playing. Reopens list in same sort mode. New: Use quicklook preview in watched list items that have an origin URL. New: Different trashing mechanism. You shouldn’t notice a difference in behaviour, but it removes a dependency. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted August 3, 2019 Author Share Posted August 3, 2019 Update. Fix deleting paths with single quotes. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted October 2, 2019 Author Share Posted October 2, 2019 Update. Let Alfred filter results in wlu. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted November 2, 2019 Author Share Posted November 2, 2019 Update. Fix for case where trying to play the same item twice could lead to list corruption. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
buffaloseven Posted December 28, 2019 Share Posted December 28, 2019 I decided to hop on the bandwagon and give this a try today and it's spitting back the following error when I try to play an item: [00:33:41.490] ERROR: WatchList[Run Script] /Users/Brad/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A7FDDB5-5037-4878-A927-CB706D0B9751/watchlist_functions.rb:385:in `block in play_item': undefined method `+' for nil:NilClass (NoMethodError) from /Users/Brad/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A7FDDB5-5037-4878-A927-CB706D0B9751/watchlist_functions.rb:395:in `play_item' from /Users/Brad/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A7FDDB5-5037-4878-A927-CB706D0B9751/watchlist_functions.rb:300:in `play' from /Users/Brad/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/D157EE3F-E0E6-4693-9A97-53231258EB81:3:in `<main>' Running on macOS 10.15.2 and Alfred 4.0.7. Am I missing some sort of Ruby dependency? Link to comment
vitor Posted December 28, 2019 Author Share Posted December 28, 2019 7 hours ago, buffaloseven said: Am I missing some sort of Ruby dependency? No, the Workflow doesn’t have any. It was a bug. Fixed on the latest version (just released). Link to comment
buffaloseven Posted December 29, 2019 Share Posted December 29, 2019 (edited) Thanks for the quick response. I updated to the latest version and now get this error: [21:53:34.208] ERROR: WatchList[Run Script] /Users/Brad/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A7FDDB5-5037-4878-A927-CB706D0B9751/watchlist_functions.rb:386:in `exist?': no implicit conversion of nil into String (TypeError) from /Users/Brad/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A7FDDB5-5037-4878-A927-CB706D0B9751/watchlist_functions.rb:386:in `block in play_item' from /Users/Brad/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A7FDDB5-5037-4878-A927-CB706D0B9751/watchlist_functions.rb:395:in `play_item' from /Users/Brad/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A7FDDB5-5037-4878-A927-CB706D0B9751/watchlist_functions.rb:300:in `play' from /Users/Brad/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/44CE6029-3DF0-438B-AC11-5478A7281816:3:in `<main>' EDIT: I was able to solve the problem by coercing the Nil value returned by the mdfind capture to a string, which then played nicely with the Dir.exist? call. My code looks like this: # The 'split' together with 'last' serves to try to pick the last installed version, in case more than one is found (multiple versions in Homebrew Cellar, for example) video_player = lambda { mpv = Open3.capture2('mdfind', 'kMDItemCFBundleIdentifier', '=', 'io.mpv').first.strip.split("\n").last.to_s return [mpv + '/Contents/MacOS/mpv', '--quiet'] if Dir.exist?(mpv) iina = Open3.capture2('mdfind', 'kMDItemCFBundleIdentifier', '=', 'com.colliderli.iina').first.strip.split("\n").last.to_s return iina + '/Contents/MacOS/IINA' if Dir.exist?(iina) vlc = Open3.capture2('mdfind', 'kMDItemCFBundleIdentifier', '=', 'org.videolan.vlc').first.strip.split("\n").last.to_s return vlc + '/Contents/MacOS/VLC' if Dir.exist?(vlc) return 'other' }.call Edited December 29, 2019 by buffaloseven Link to comment
vitor Posted December 29, 2019 Author Share Posted December 29, 2019 8 hours ago, buffaloseven said: by coercing the Nil value returned by the mdfind capture to a string That’s unnecessary and leads to more code. We can make it less code by getting rid of Dir.exist?. I’ve done so in the just released update. Thinking about it today, the bugs were introduced when I changed the code to allow for multiple installations of the same player. That’s an uncommon situation, but it can happen. Link to comment
buffaloseven Posted February 4, 2020 Share Posted February 4, 2020 On 12/29/2019 at 6:56 AM, vitor said: That’s unnecessary and leads to more code. We can make it less code by getting rid of Dir.exist?. I’ve done so in the just released update. Thinking about it today, the bugs were introduced when I changed the code to allow for multiple installations of the same player. That’s an uncommon situation, but it can happen. Haha, sounds good to me. I'm not a coder by trade or anything like that, so I tend to just find band-aids. I'm glad you were able to make a better solution than what I did 🙂 Link to comment
vitor Posted February 5, 2020 Author Share Posted February 5, 2020 On 2/4/2020 at 2:12 AM, buffaloseven said: Haha, sounds good to me. I'm not a coder by trade or anything like that, so I tend to just find band-aids. I'm glad you were able to make a better solution than what I did 🙂 You still found the bug and a way to fix it, so thank you! Link to comment
vitor Posted March 15, 2020 Author Share Posted March 15, 2020 Update. When copying a played URL, no longer auto-paste. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted April 4, 2020 Author Share Posted April 4, 2020 Update. Two interfacing changes. When marking an item as watched without playing, do not refresh Alfred. When playing an item, do not close Alfred. Both changes are meant to allow acting on multiple items fast. For example, when opening a video, the player will steal focus from Alfred and close it anyway, but until then you have the chance to ↵ on other items, setting up a short queue. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted April 23, 2020 Author Share Posted April 23, 2020 Updates. Checking for audiovisual contents happens before moving directory. move_on_add takes a full path, instead of relative to home (~ works). To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted September 7, 2020 Author Share Posted September 7, 2020 Update. New feature, you can now convert a stream to a local file by acting on it with ⌥↵. It requires the DownMedia Workflow to be installed. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted October 13, 2020 Author Share Posted October 13, 2020 Update. Added options for faster adding and playing. Play through watchlist is a new File Action to add and play a local item, and add_and_play_stream does the same for streams, supported by PlayAddress. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted February 21, 2021 Author Share Posted February 21, 2021 (edited) Update. Detect mpv installations even when only the CLI is installed. It only searches Homebrew default paths (/usr/local/bin/mpv and /opt/homebrew/bin/mpv). To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Edited February 21, 2021 by vitor Link to comment
vitor Posted May 16, 2021 Author Share Posted May 16, 2021 (edited) Update. Added something I’ve been thinking about for quite some time: a quick playlist feature. You may have noticed that Alfred’s windows doesn’t immediately close when playing an item through the WatchList. That was a cheat to allow for quick actioning of something else, to play multiple items in succession. No more! Now, use ⇧↵ to add an item to a quick playlist. After adding everything you want, press ↵ and they will play in order. If you add to a playlist but don’t action it for a few minutes (3, currently), it will be ignored when you add another item, effectively starting from scratch. Just built the feature, so it may suffer some adjustments as I test it out more. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Edited May 16, 2021 by vitor Link to comment
vitor Posted July 21, 2021 Author Share Posted July 21, 2021 (edited) Update. In wlp, fn↵ Opens the item’s URL in the default web browser. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Edited July 26, 2021 by vitor Link to comment
vitor Posted July 26, 2021 Author Share Posted July 26, 2021 Update. Removed option to play without marking as watched. Opening the item’s origin URL is in its place. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted September 5, 2021 Author Share Posted September 5, 2021 Updates. If possible, items are recovered from trash on marking unwatched. If successful, you’ll hear a sound. If not, you’ll get a notification with the reason.Changed the error sound. Made some code cleanup to better handle a few cases. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted October 19, 2021 Author Share Posted October 19, 2021 Update. Ignore move_on_add once with ⌘. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted December 18, 2021 Author Share Posted December 18, 2021 Update. When a path is deleted, if there’s another with the same name in the Trash, the new one will have the date appended. This new version keeps track of the new name so it can recover it accurately. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted April 17, 2022 Author Share Posted April 17, 2022 Update. New trash_on_watched Workflow Environment Variable can be set to false to disable the trashing behaviour. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted June 12, 2022 Author Share Posted June 12, 2022 Update. Removed the swl Keyword (always felt it was a clunky way to do it) and replaced it with a Universal Action. Added another for adding the URL and playing it immediately. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now