Get-PlexInfo and txm

sz-rsync, not expected to work yet.
This commit is contained in:
lksz 2020-11-01 01:15:34 -05:00
parent 4de25b4a56
commit 2302343a15
3 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,12 @@
$local:PlexInfo = $(try{([xml](Get-Content /run/plex.stream.counter/sessions -Raw -ErrorAction Stop)).MediaContainer}catch{})
$PlexInfo.ChildNodes | ForEach-Object { [PSCustomObject]@{
Object = $_
Type = $_.type
Library = $_.librarySectionTitle
Title = $(@($_.grandparentTitle,$_.parentIndex,$_.parentTitle,$_.index,$_.title) | Where-Object {$_}) -join ' | '
User = $_.User.title
Offset = [TimeSpan]::FromMilliseconds($_.viewOffset).ToString() -split '\.' | select-object -first 1
Duration = [TimeSpan]::FromMilliseconds($_.duration).ToString() -split '\.' | select-object -first 1
# UpdateTime = [TimeSpan]::FromMilliseconds($_.).ToString()
} }

6
sys.Linux/sz-rsync.ps1 Normal file
View File

@ -0,0 +1,6 @@
#setopt dotglob
$szSrc="'$($args -join "','")'"
$szSrcCount=$(Invoke-ExpressionEx -sudo "& find $szSrc -type f | wc -l )
Invoke-ExpressionEx -sudo "& rsync --archive --acls --xattrs --human-readable -v $szSrc /szmedia/media/ | pv -lepts $szSrcCount"
#unsetopt dotglob

1
sys.Linux/txm.ps1 Normal file
View File

@ -0,0 +1 @@
tmux set-option mouse $args