This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "string" | |
| -- Make sure to install Hammerspoon (brew install --cask hammerspoon) and blueutil (brew install blueutil). | |
| -- Ensure to give sufficient access in macOS so that the commands can be ran: | |
| -- -- System Settings -> Privacy & Security -> Accessibility -> Allow Hammerspoon | |
| -- -- System Settings -> Privacy & Security -> Bluetooth -> Select app "Hammerspoon" | |
| -- Place this file in your home folder, then open Hammerspoon and click "Reload config" | |
| function checkBluetoothResult(rc, stdout, stderr) | |
| -- Use for debugging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Configuration | |
| NAS_HOSTNAME="your_nas_hostname" # Replace with your NAS hostname | |
| NAS_MAC="XX:XX:XX:XX:XX:XX" # Replace with your NAS MAC address | |
| NAS_USER="your_username" # Replace with your SSH username | |
| PLEX_CONTAINER="plex-linuxserver" # Replace with your Plex container name | |
| # Function to check if NAS is responding | |
| check_nas_available() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| echo "File type count:" | |
| fileExtensions=( aiff mp3 wav m4a flac alac ) | |
| totalFileCount=$(find . -type f \( -name "*.aiff" -o -name "*.mp3" -o -name "*.wav" -o -name "*.m4a" -o -name "*.flac" -o -name "*.alac" \) -not -path "*/\.*" | wc -l) | |
| for fileExtension in "${fileExtensions[@]}" | |
| do | |
| fileCount=$(find . -type f -name "*.${fileExtension}" -not -path "*/\.*" | wc -l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| FullTitle, | |
| COUNT(FullTitle) as COUNT | |
| FROM ( | |
| SELECT | |
| CONCAT(Title, " - ", Name) AS FullTitle | |
| FROM djmdContent AS c | |
| INNER JOIN djmdArtist AS a ON c.ArtistID = a.ID | |
| WHERE | |
| a.rb_local_deleted = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT c.title AS TrackTitle, | |
| a.NAME AS ArtistName | |
| FROM djmdcontent AS c | |
| LEFT JOIN djmdartist AS a | |
| ON a.id = c.artistid | |
| WHERE c.rb_local_deleted = 0 | |
| AND NOT EXISTS(SELECT * | |
| FROM djmdsongplaylist AS sp | |
| WHERE sp.contentid = c.id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| c.Title AS TrackTitle, | |
| COUNT(sp.ID) AS PlaylistCount, | |
| GROUP_CONCAT(pl.Name, ', ') AS PlaylistNames | |
| FROM | |
| djmdContent AS c | |
| INNER JOIN | |
| djmdSongPlaylist AS sp | |
| ON c.ID = sp.ContentID | |
| INNER JOIN |
OlderNewer