Jump to content

WatchList — Play and manage local audiovisual content and streams


Recommended Posts

WatchList saves your media and streams to a list, eases the choice of what to play next and gets rid of it when you’re done.


For local content, select the files and directories to add and apply the Add to watchlist file action. If the move_on_add Workflow Environment Variable is set, the paths will be moved to that directory. Items will be prepended or appended to the list depending on the add_item_order Workflow Environment Variable. Calling swl adds the URL in your clipboard as a stream (⌘↵ for the full playlist).


Use the lists_dir Workflow Environment Variable to pick a custom save location for your data. This allows for easy syncing and cloud backups.


Next, interact with your list. Options begin with wl.


vtwvvxI.png


wlp shows the list of items to play. A reference to each subtitle section can be found at the end.


CeHpXMh.png


wls calls wlp under the hood, but with a custom sort order.


wr8MgEm.png


In both cases:

  • ↵ plays the selection.
  • ⌃↵ opens the item’s URL in the default web browser.
  • ⌥↵ downloads a stream (requires DownMedia) or rescans a series’ directory (useful after manual changes).
  • ⌘↵ marks as watched without playing.
  • ⇧↵ appends to a temporary playlist. After adding the desired items, ↵ plays them in order. A playlist which was neither modified nor played for a few minutes will be ignored.
  • ⇧ or ⌘Y shows a Quick Look preview on files and streams.


If the top_on_play Workflow Environment Variable is true, the item will be moved to the top of the list before beginning playback.


mpv, IINA, and VLC are directly supported. If playback exits with a non-zero code, the item will not be marked as played (hence not trashed). Take advantage of that!


wlu is the watched list. Its size is controlled by the maximum_watched Workflow Environment Variable. Actioning an item will mark it unwatched and recover it from the Trash if it find a path with the same name. If the item has an origin URL (shown in the subtitle):

  • ⌘↵ opens it in the default web browser.
  • ⌥↵ copies it to the clipboard.
  • ⇧ or ⌘Y shows a Quick Look preview

srW0zxy.png


wle is for reordering, renaming, and manually removing of items.


If you use DownMedia it has an option to add the downloaded video files directly to your watchlist.


Subtitle reference:


There are three types of items: files, series, and streams. streams can be further categorised into single item or playlist. Each result has its name as the top title. The subtitle confers more detailed information and follows this template:

 

≈ (4) 𐄁 22m 32s 𐄁 691M 𐄁 /Some/Path

 

  • ≈. Indicates item is a stream.
    • file: N/A.
    • series: N/A.
    • stream: Always present.
  • (4). Number of elements.
    • file: N/A.
    • series: Remaining audiovisual files in directory.
    • stream: Single item: N/A. Playlist: All elements.
  • 22m 32s. Running time.

    • file: Running time of file.
    • series: Running time of first audiovisual file in directory.
    • stream: Combined running time of all elements.
  • 691M. Size.

    • file: Size of file.
    • series: Size of first audiovisual file in directory.
    • stream: N/A.
  • /Some/Path. Path.

    • file: Path of file.
    • series: Path of directory.
    • stream: URL.

 
Download | Source

Works well with
DownVid

PlayAddress

Edited by vitor
Link to comment

Thanks for this workflow, it is great!

 

Wow, it wasn't working at all before you updated. Could be useful for marathon frying sessions, thx!

 

Thank you both. I apologise for it not working before, I had changed a variable name last night that I forgot to update everywhere — I’ve only noticed it this morning when I tried to use it and it wasn’t working.

Please let me know if you have any suggestions.

I’m thinking of adding support for multiple lists (so you can have, for example, different lists for movies, short videos, and books), but this would require an extra step when adding to Alfred, even if I have a default list, so I’m still not sure if it’d be worth it (adding some friction seems to defeat the purpose of this, but on the other hand it could really be much more useful).

Edited by Vítor
Link to comment

Update.

It now outputs notifications (it’s nice to know the action you’ve selected got through).

When deleting files, instead of simply moving them to the trash, it uses applescript to delete them. This will give you both that satisfying “send to trash” sound and will give you greater flexibility, like having access to the Put Back option in the trash, or being able to press ⌘+Z to get the files to their original locations (you need to do it once for each file).

Edited by Vítor
Link to comment
  • 3 weeks later...

Hi,

 

Perhaps I am missing something but I cannot add a filename to the list. I see no option to add to watchlist from the File menu in Finder. Did I do something wrong? This really looks like a neat workflow.

 

Thanks

Link to comment
  • 2 weeks later...
  • 1 month later...

Big update. It’s now way more useful.

You’re no longer limited to blindly watching files in sequence, and having to constantly edit the list by hand when you want to watch a file that is not the immediate next one. Instead of using “wl” for everything, now each option has it’s own shortcut (don’t worry, they all start with “wl”, so you can still type just that to see what they are). You can now pick what files to act on, for either watching or marking as unwatched (they’ll still appear sequentially on the list, so there’s no extra work involved if you still want to watch them in order — just pick the first one).

The workflow also keeps track of files in a different way (so it’s easier to manage). It now uses two lists (“towatch” and “watched”), so you’ll probably want to run

rm "${HOME}/Library/Application Support/Alfred 2/Workflow Data/com.vitorgalvao.alfred.watchlist/watchlist.txt"

in a terminal, to get rid of the old file (there’s no problem if you don’t, it’ll just stay there, and won’t interfere with the rest of the functionality).

The “Show” option was also removed, as it was now somewhat redundant.

Edited by Vítor
Link to comment
  • 4 weeks later...

Update. If you choose any of the options that let you pick from a list (“wlp” and “wlu”) and continue typing after it (don’t put a space, just continue typing), you’ll start filtering the names, so you can quickly find the ones you want.

Link to comment
  • 2 months later...
  • 3 weeks later...
  • 3 weeks later...
  • 1 month later...

Update.

It now uses terminal-notifier. This is a departure from my previous stance of having the workflow work completely with public domain code, triggered by the fact that the alternative I’ve build sometimes shows you a warning that interrupts you, due to not being digitally signed, as I currently do not have an Apple Mac Developer account.

I believe I’ve found a somewhat satisfactory way to handle the issues I had with this, though. All non-public-domain code sits right at the top of the workflow, under a “_licensed” directory. This way it’ll be dead-simple to know what you can use freely and what is somewhat restricted. I’m not completely satisfied with this solution, and if I ever find a suitable way to remove terminal-notifier and make all the code in the workflow 100% public domain (like someone willing to take notificator and signing it), that’s what I’ll do.

Since I’ve added that, I decided to make two other changes (one change and one addition) — it uses trash to delete files (you shouldn’t see any change functionally), and there’s a new “wli” option that uses mediainfo to show the filenames and durations, as opposed to filenames and filepaths. Selecting a file in this mode will be the same as using “wlp” (it will play the file and mark it as watched); it is, however, slower (it has to go through the extra operation of checking the duration of each video), which is why it is a separate option.

Link to comment
  • 4 months later...

Would really love to be able to have multiple lists, so that I could type "wlp" "name of the playlist", then select the video in the list. 

Is such a feature in the works?

It is not, although I’ve considered it multiple times in the past. Ultimately, I always decide against it.

Multiple new commands would be needed, with multiple levels of interaction each — list lists, create new list, edit list, delete list, play file from list, and more. The Add to watchlist option would be somewhat impaired (needing yet another command — move to list), and wle, which is only there as a bit of last resort, would become central to managing everything. All this would lead to what I believe to be a crummy interface and experience. It would become akin to a todo app that uses files instead of text, and that is definitely not my goal for it.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...