Skip to content

Instantly share code, notes, and snippets.

@PieGuy314
Created April 12, 2020 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PieGuy314/8a791a55fd4b6c7c991270b50307369d to your computer and use it in GitHub Desktop.
Save PieGuy314/8a791a55fd4b6c7c991270b50307369d to your computer and use it in GitHub Desktop.
List parent dirs of watched movies
/bin/sh
curl --silent --user ${USER}:${PASS} --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": {"filter": {"field": "playcount", "operator": "greaterthan", "value": "0" }, "properties": [ "file" ] }, "id":"libMovies" }' --header 'content-type: application/json;' http://${IP_ADDR}:8080/jsonrpc | jq '.result | .movies | .[] | ."file"' | tr -d \" | awk -F/ '{print $6}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment