Jump to content

WatchList — Play and manage local audiovisual content and streams


Recommended Posts

  • Replies 90
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

You misunderstood — you do it from Alfred’s file actions, not the Finder’s file menu. Select the files you want, and then press the keyboard shortcut (I think the default is Cmd+Opt+\).

Keep a list of audiovisual content to watch and listen to. We often have series of videos and streams that we’d like to watch but not necessarily keep after, but tracking which we’ve already s

Glad it’s working. Will release a version with the fix soon. Enjoy the workflow!

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 post
  • 1 month later...
  • 5 weeks later...
  • 1 month later...

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 post

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 by buffaloseven
Link to post
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 post
  • 1 month later...
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 post
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 post
  • 1 month later...
  • 3 weeks later...

Update.

 

Two interfacing changes.

  1. When marking an item as watched without playing, do not refresh Alfred.
  2. 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 post

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 post

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 post
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...