Browse Source

Get-PlexInfo and txm

sz-rsync, not expected to work yet.
master
lksz 1 year ago
parent
commit
2302343a15
3 changed files with 19 additions and 0 deletions
  1. +12
    -0
      sys.Linux/Get-PlexInfo.ps1
  2. +6
    -0
      sys.Linux/sz-rsync.ps1
  3. +1
    -0
      sys.Linux/txm.ps1

+ 12
- 0
sys.Linux/Get-PlexInfo.ps1 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
- 0
sys.Linux/sz-rsync.ps1 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
- 0
sys.Linux/txm.ps1 View File

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

Loading…
Cancel
Save