Search This Blog

Thursday, February 18, 2016

Fixing a long annoying issue Plex + FireFly + DVD Order



Download DVDOrderAgent.bundle from https://github.com/HuggableSquare/DVDOrderAgent.bundle

Follow steps in this post
1) Stop plex server.
2) Copy DVDOrderAgent.bundle,zip to plug in folder
    Path ~ C:\Users\\AppData\Local\Plex Media Server\Plug-ins
3) Extract  DVDOrderAgent.bundle,zip  to here
    Delete zip file
4) Start Plex server
5) In Plex web app,  go to a TV show - not a season page, the main page for the show - click the ellipsis (...) on the left and select "Fix Incorrect Match". Click on the "Auto Match" drop-down menu, and select "TheTVDBdvdorder". The metadata will be updated with the correct alternate order.
Episode order is fixed!!!

Monday, February 8, 2016

Useful Batch Files




Batch File Copy  full file names for all files in folder and sub folders to text file.

(replace &gt with )


dir C:\Data\Documents\*.* /b /s /a:-D >  C:\Documents.txt





Batch File: Copy just file name of files in folder to text file:
(replace &gt with )


dir C:\Data\Documents\*.* /o-n-d /b  >  C:\Files.txt

Some Useful powershell scripts


Power shell scripts:

#1 Read file names from csv file using pipe delimiter and copy files to with new name to new destination

C:\Temp\finals.csv - csv file
FileName - source file
NewFileName - new name and destination for file

$csv = Import-Csv L:\DataMigration\CalRad\Reports_finals.csv '|' -Header FileName,NewFileName
foreach ($line in $csv) {    If ((Test-Path $line.FileName)){ Copy-Item -path $line.FileName -Destination $line.NewFileName } }



#2  Get all of the pdf full file paths
      execute application using full file path as a command argument.


  $items = Get-ChildItem "L:\DataMigration\CalRad\LegacyData\LegacyReports\Scanned_Docs" -Filter *.pdf 
  foreach ($item in $items) { L:\DataMigration\CalRad\PDFToImage\PDFToImages.exe $item.FullName 140}


#3) import csv file pipe delimited with 4 columns
      copy file to new location using 3rd parameter as source location and 4th parameters as destination path and file name.


$csv = Import-Csv L:\DataMigration\CalRad\LegacyData\LegacyReports\Scanned_Docs.csv '|' -Header Accession,Type,FileName,NewFileName
   foreach ($line in $csv) {    If ((Test-Path $line.FileName)){ Copy-Item -path $line.FileName -Destination $line.NewFileName } }