Drazzilb

Members
  • Posts

    81
  • Joined

  • Last visited

Everything posted by Drazzilb

  1. I'm looking to run a power shell script on my ritualized machine on a timer to include any new files I've added to my movies folder. I found a power shell script online that seems to work for the most part however, I'm not versed AT ALL in running such things. The main problem is that my movie library has sub folders. Since scanning recursively is not supported by handbrake yet I'd like to use this functionality until that feature is implemented. # If you get execution errors running a Powershell Script, start Powershell as Admin and execute the following "Set-ExecutionPolicy RemoteSigned" $TVShowsFolder = "" $MoviesFolder = "\\tower\Media\test\" $TVShowsBackupFolder = "" $MoviesBackupFolder = "z:\" $HandBrakeCLI = "C:\Program Files\Handbrake\HandBrakeCLI.exe" $HandBrakePreset = "ipad 3" "Starting TV Prox" "Checking for existing TV Prox" $Prox = Get-WmiObject Win32_Process -Filter "Name like '%powershell%'" | select-Object CommandLine | where {$_ -match "tvprox"} $Proxc = $Prox | measure if ($Proxc.Count -gt 1) { "We already have a running TV Prox .. exiting" exit } #Get a list of TV Shows and Movies that are not m4v or mp4. Update the extensions list below as necessary to include missed files. $TVShows = get-childitem $TVShowsFolder -include *.mkv,*.avi,*.mpeg,*.mpg -recurse | foreach ($_) { $_.fullname } | sort $Movies = get-childitem $MoviesFolder -include *.mkv,*.avi,*.mpeg,*.mpg -recurse | where {$_.length -ge 100MB} | foreach ($_) {$_.fullname} | sort "Processing TV Shows" foreach ($SourceFile in $TVShows) { "Processing: $SourceFile" $TargetFile = [io.path]::GetDirectoryName($SourceFile) + "\" + [io.path]::GetFileNameWithoutExtension($SourceFile) + ".m4v" "Create: $targetfile" & $HandBrakeCLI -i $SourceFile -o $TargetFile --preset=$HandBrakePreset $BackupFile = $SourceFile.Replace($TVShowsFolder, $TVShowsBackupFolder) "Backup: $BackupFile" New-Item -ItemType File -Path $BackupFile -Force Move-Item $SourceFile $BackupFile -Force } foreach ($SourceFile in $Movies) { "Processing: $SourceFile" $TargetFile = [io.path]::GetDirectoryName($SourceFile) + "\" + [io.path]::GetFileNameWithoutExtension($SourceFile) + ".m4v" "Create: $targetfile" & $HandBrakeCLI -i $SourceFile -o $TargetFile --preset=$HandBrakePreset $BackupFile = $SourceFile.Replace($MoviesFolder, $MoviesBackupFolder) "Backup: $BackupFile" New-Item -ItemType File -Path $BackupFile -Force } This is the script i'm currently trying to use. However, there are several things I'd like to change to optimize it for my purposes. 1. I'd like for when the script is ran to check the output folder to see if there are any new files added. And skip those already converted. 2. Unless i'm missing it. I'd like to set a destination folder. Basically the end goal is for me to not log into my server to start up any commands for this to run. All i want to do is add videos to my "movie" folder and an hour or so later have a perfectly converted copy in my "ipad" folder. Once again I don't know much about PS so any help will be greatly appreciated P.S. if I've put this in the wrong place sorry. I've been searching for what i want for a couple of hours. Edit: I found this script. Seems to be a bit more useful. However, I'm not sure about it moving any of my original files. # Script to Convert multiple files with handbrake, for individual movie files and series # Will recurse through a folder and convert the files to mp4 with handbrake # Will place them into a new location maintaining folder structure # Move the original converted files to a new location # Delete empty folders once files moved # Edit paths, file types and handbrake location as required. #Where we are looking for Files in folders $search="\\tower\Media\Test" #Root Folder for newly created mp4 files $newfolder="z:\" # Path to move completed original files to $donefiles="" #handbrake exe file $handbrake="c:\Program Files\HandBrake\handbrakecli.exe" #file type we are working on $ext="mkv" #handbrake preset $HBPreset="ipad" #End of Edit section #Search Paths $path=$search -replace "\\","\\" $donepath=$newfolder -replace "\\","\\" #todays date $date=get-date -format ddMMyy-HHmm #operations log $Logfile="$newfolder\$date-log.txt" # Get directorys $directorys=Get-ChildItem -Path $search -Recurse | Where-Object { $_.PSIsContainer } foreach ($item in $directorys) { "Searching - $item" | out-file $logfile -append # Search for files extention $TestP=$item.fullname+"\*.$ext" #test if any files of ext type in folder file there if (Test-Path $TestP) { "found $ext in $item" | out-file $logfile -append $a=$item.Fullname #create new directory variable for file in new location path $newdirectory = $a -replace $path,$newfolder "Create $newdirectory" | out-file $logfile -append #check if folder exits, if not make it if ((test-path $newdirectory) -ne $true) { new-item $newdirectory -itemtype directory } #get a list of the files $videofiles=@(get-childitem -path $item.fullname *.$ext) # execute the following on each file in folder foreach ($vid in $videofiles) { "Found File $vid" | out-file $logfile -append #get file name and path $b=$vid.Fullname #create a new filename with new path and rename file with .mp4 $newFileName = $b -replace $path,$newfolder $newFileName = $newFileName -replace "\.$ext$",".mp4" "New File Name $newfilename" | out-file $logfile -append get-date -format ddMMyy-HHmm | out-file $logfile -append # create a log for this file $HBLogfile="$newfolder\$date-$vid.name-log.txt" write-host "$vid Converting to $newfilename" # do the magic and convert using the present from old file to new one, write out a log of what handbrake does & $handbrake -i $vid.FullName -o $newFileName --preset $hbpreset 2>&1 | add-content -path $hblogfile get-date -format ddMMyy-HHmm | out-file $logfile -append #create new directory variable for file in new location path $newdirectorymove=$newdirectory -replace $donepath,$donefiles "Create $newdirectorymove" | out-file $logfile -append #check if folder exits, if not make it if ((test-path $newdirectorymove) -ne $true) { new-item $newdirectorymove -itemtype directory } #move the original file here write-host "$vid - Done Movingto $newdirectorymove" # move the item move-item -path $vid.fullname -destination $newdirectorymove $oldfile=$vid.fullname if ((get-childitem $vid.directory | measure ).count -eq 0) { remove-item $vid.directory } "Moved $oldfile to $newdirectorymove"| out-file $logfile -append } } } get-date -format ddMMyy-HHmm | out-file $logfile -append "----------------------" | out-file $logfile -append I was wondering if it would be possible for it to create/read a log file to keep track of what it has already copied. Also if anybody knows how to put a progress counter or bar or something that'd be great.
  2. I'm looking for something very similar to this. Basically, I have my (movie) folder that I'm converting the movie content to be able to be loaded onto an iPad. What I'm looking for is to basically have my movie folder (which has subfolders) watched. Anytime a *.mkv file is loaded into that movie folder or into a subfolder. I'd like for handbrake to convert it, as well as convert any older movies that have not been converted yet. All my converted files are stored in one large directory with no subfolders. If this is already an ability within this docker container please let me know. Automating this entire process would be stellar!
  3. Where would one go for your own certs? How would one install said certs?
  4. Okay. That makes sense. I think that's what I was looking for. However, my media manager software in the near future is said to trigger updates so once that is finished up that's what I'll be using. Man you've been a huge help. Yeah. My laptop seems to be connected with maria quite well. I'm now testing everything across the network with my living room's system. Once again, if I have issues I'll call back. EDIT: WORKS LIKE A DREAM.. Just tested it.
  5. You must make sure that there is a copy of sources.xml in the userdata folder in the headless docker container. Okay. Maybe I have something wrong in my headless Kodi. Like I said before I copy and pasted the advancedsetings.xml file to the headless folder > Added a movie > Restarted kodi (stopped and started the docker) > Went to my client machine (laptop) > checked for any updates... Nothing.. Nothing new the movies that I'm adding are extremely short and easy to scrape. Both instances are using the same advancesettings.xml and same source.xml
  6. Rodger that. I figure'd anything that was useful was removed after the reset. If or when it happens again. I'll repost with a new diagnostic log. thank you very much!
  7. LOL. I don't run my heater in my house so yeah it is cold today. However, this isn't the first time that this has happened. The other day was normal temp. (approx 60 degrees F, for outside temp) I've attached the complete diagnostics *.zip file tower-diagnostics-20160110-1333.zip
  8. Well, I was the one who called you peach either way. LOL.. Okay, another question. So it's my understanding that if any new content is added to the source folder (where all the videos/music is held) this data will be then added the headless Kodi. That, in turn, will update any of the client machines. However, when I add a new movie to the folder nothing changes on my laptop's Kodi. Does the headless version of Kodi not scrape the new content (automatically)? Or Am i required to go into kodi and scrape the library every time i add something new so that all my client machines are up to date?
  9. OMG!!! I think that was it!!! I'm going to do some more testing to check it out.. but I think you nailed it! Thank you. (I'll be back if i have more questions)
  10. Right. That's basically what I'm trying to do is just simply get my laptop to connect to the mariadb. However, I'm not even 100% sure that I've set it up correctly. I'm not familiar with how to that. I know I need to set up the username and PW on the database. I listed the steps I took to do that. (is that the correct steps?) I guess my question here is once I've installed mariadb. What is the simplist way to ensure that I set up the user correctly? Also, to test to see if my version of kodi on my laptop is indeed able to connect to it? (sorry if i'm being difficult or obtuse. I've been at his for hours and its mainly due to my inexperience)
  11. Wow, this week has been special, first I get called baby and now peach..... Must be doing something right then. EDIT: On that link you gave me for the setting up of the Setting up MySQL which OS would I be looking for? or is this step already accomplished through the docker app?
  12. Twice now my array has come off line due to a red x on one of my drives. I'm wondering if it is going bad (sadly its not that old). Attached is a copy of it's smart report. I don't know what I'm looking at on it to see if something is going wrong. Please help. oh if this isn't the right place for this. I'm very sorry. WDC_WD20EZRX-00DC0B0_WD-WMC301624101-20160110-1209.txt
  13. I assume to do that just instead of using root (no password) in heidisql just use the kodi login and PW? I listed the steps i used to create the kodi user above. Is there another way to do that?
  14. I for the life of me cannot set this up. Here are the steps I am taking. Please let me know how I'm messing this up....... First: I installed kodi headless from linuxserver/kodi-headless (off of the Community Applications plugin). I then installed MariaDB from linuxserver/mariadb:latest same place I from there log into MariaDB from HeidiSQL. I then go to tools > User Manager > +Add > Username kodi > host (I've tried localhost and the server's IP address) > PW (twice) > Check box next to global privileges > Save. From there I go on the left-hand side and click the right arrow next to MySQL > go down to user open the data section of that field. (I see that kodi was made as a user the PW). However, the PW has changed to a long string of letters and numbers. (I assume encrypted) (will this have any effect on the password for the headless logging in or my remote machine?) I then go onto my server. find the advancedsettings.xml file on the headless Kodi. (I've used the provided version of the advancedsettings.xml and the abbreviated version just listed below. I also place the exact same file (just by copying it) into the AppData of my client machine (my laptop) <advancedsettings> <videodatabase> <type>mysql</type> <host>***.***.***.***</host> <port>3306</port> <user>kodi</user> <pass>****</pass> </videodatabase> <musicdatabase> <type>mysql</type> <host>***.***.***.***</host> <port>3306</port> <user>kodi</user> <pass>****</pass> </musicdatabase> </advancedsettings> From here I go onto Kodi from my laptop > Add a source > Set the content > It asks if i want to refresh information? I say Yes > NOTHING HAPPENS! I'm not sure what's going on. Nothing is being added to the library on my local machine. Also, if I add anything new to the folder selected that new information isn't added to the database either. I Personally don't think that either instance of Kodi is accessing the database. However, I'm not super knowledgeable about running any of this software at all. I just can't find anything on the internet or search function to help me out. I've also tried this with sparklyballs version of a headless-kodi and mariaDB all in one with no luck either. http://lime-technology.com/forum/index.php?topic=37209.0
  15. Okay. I'm having some serious problems here. I've installed the docker for Isengard from the community applications plugin. I left all the settings alone placing the information required in AppData for both the mariaDB and for Kodi. I have a version of Kodi 15.2 installed on my laptop here with a testbed of movies on the unraid server. I went into my unraid machine and executed the docker exec Koma createuser kodi kodi command. (this was after I first waited for everything to populate on the server, then stopped the container, then started the container). However..... docker exec Koma createuser kodi kodi doesnt do anything but give an error If I use docker exec Koma-Isengard createuser kodi kodi it proceeds to ask for a password (if I place Kodi in as the password it gives me an error). So i leave it blank. From there I copy the advancedsettings.xml into the userdata folder for the one running on my laptop. (only after editing a few things Once I start Kodi up. I scan my library of movies. However, if I add anything new to the library after the initial scan, nothing is added to the library of my laptop. Perhaps I'm not understanding the purpose of this application or maybe I'm using it wrong. My thought was that this docker contained both a version of Kodi-Isengard and a database program so that it can keep a library file of Kodi up to date anytime I add anything to a specified folder without having to go to any of my other client machines and manually update them Please help, Thank you.
  16. Okay, I've been at his for a while. I'm not the brightest bulb when it comes to most of the commands and wants of this here machine. However, I've managed to get the container working. (by installing the container then going back in and removing the /http) When I go back into my AppData folder and into certs there aren't any certs being generated (or atleast there are no files listed there). Is that normal? Also, I'd like to edit the config.php file. However, when I try to edit the file it gives me an error in notepad++ that it cannot open the file. I'm assuming due to some permissions settings. Also assuming those settings cannot be edited from the standard windows screen. My main goal here is to be able to access my cloud information remotely (off the network), hence the need to edit config.php. I'm assuming the SSL certificates will provide a lil' bit of protection for my files as well as the standard ye 'ol password. Aside from not putting my owncloud on the internet are there any other precautions I can take to further protect my systems and network? (the way I understand it is basically all i have to do to allow access is to just forward the port that i'm using for the cloud)
  17. Well I did the ping and that worked fine. That was a good lead. However, When I telnet to my server I got this message. ERROR: device scan failed '/mnt/cache/docker.img' - Block device required Thanks in advance. Well idk what happens it appears everything is working just fine. TYVM
  18. Okay i've done quite a bit of research on this issue however, I've had no luck at solving it. I've created a new share called apps, that is only on my cache drive (BTRFS) a folder in that share called Docker I then point the docker page to place a 40gb .img file /mnt/cache/apps/docker/docker.img I then use https://github.com/gfjardim/docker-containers/tree/templates then i press "Save" then "Start" Click the "Big Green +" Go to templates drop down..... Nothing populates... This is where i need help. I've tried different Shares, Different drives. Different Img sizes. I did not update from a previous version this is a 100% fresh install so dockerman shouldn't be an issue. I've also tried different repos. http://pastebin.com/AiHTgEqb Log file Any help would be wonderful. and if i've missed a step or anything please let me know. Thanks in advance.
  19. I've been playing around some. Added cache drive. moved the docker img to /mnt/cache/apps/docker/docker.img the cache FS is BTRFS. still no luck. Looking for any assistance.
  20. /usr/bin/tail -n 42 -f /var/log/syslog 2>&1 Dec 17 16:38:08 Tower php: Creating new image file for Docker: /mnt/disk1/docker.img size: 50G Dec 17 16:38:09 Tower php: Btrfs v3.17.2#012See http://btrfs.wiki.kernel.org for more information.#012#012Turning ON incompat feature 'extref': increased hardlink limit per file to 65536#012fs created label (null) on /mnt/disk1/docker.img#012#011nodesize 16384 leafsize 16384 sectorsize 4096 size 50.00GiB Dec 17 16:38:09 Tower kernel: BTRFS: device fsid 0e21383e-f865-4bda-bfa8-6eab6372d4d2 devid 1 transid 4 /dev/loop8 Dec 17 16:38:09 Tower kernel: BTRFS info (device loop8): disk space caching is enabled Dec 17 16:38:09 Tower kernel: BTRFS: flagging fs with big metadata feature Dec 17 16:38:09 Tower kernel: BTRFS: creating UUID tree Dec 17 16:38:09 Tower php: Resize '/var/lib/docker' of 'max' Dec 17 16:38:09 Tower php: starting docker ... Dec 17 16:38:09 Tower kernel: BTRFS: new size for /dev/loop8 is 53687091200 Dec 17 16:38:10 Tower php: Dec 17 16:44:53 Tower php: /etc/rc.d/rc.docker stop Dec 17 16:44:53 Tower php: stopping docker ... Dec 17 16:44:54 Tower php: unmounting docker loopback Dec 17 16:44:56 Tower php: Dec 17 16:45:08 Tower php: /etc/rc.d/rc.docker start Dec 17 16:45:08 Tower php: Creating new image file for Docker: /mnt/disk2/docker.img size: 40G Dec 17 16:45:12 Tower php: Btrfs v3.17.2#012See http://btrfs.wiki.kernel.org for more information.#012#012Turning ON incompat feature 'extref': increased hardlink limit per file to 65536#012fs created label (null) on /mnt/disk2/docker.img#012#011nodesize 16384 leafsize 16384 sectorsize 4096 size 40.00GiB Dec 17 16:45:12 Tower kernel: BTRFS: device fsid fec5c40f-027b-4a1c-8bd4-ea9367e7399a devid 1 transid 4 /dev/loop8 Dec 17 16:45:12 Tower kernel: BTRFS info (device loop8): disk space caching is enabled Dec 17 16:45:12 Tower kernel: BTRFS: flagging fs with big metadata feature Dec 17 16:45:12 Tower kernel: BTRFS: creating UUID tree Dec 17 16:45:12 Tower php: Resize '/var/lib/docker' of 'max' Dec 17 16:45:12 Tower php: starting docker ... Dec 17 16:45:12 Tower kernel: BTRFS: new size for /dev/loop8 is 42949672960 Dec 17 16:45:13 Tower php: Dec 17 16:45:26 Tower php: /etc/rc.d/rc.docker stop Dec 17 16:45:26 Tower php: stopping docker ... Dec 17 16:45:27 Tower php: unmounting docker loopback Dec 17 16:45:30 Tower php: Dec 17 16:46:09 Tower php: /etc/rc.d/rc.docker start Dec 17 16:46:09 Tower php: Creating new image file for Docker: /mnt/disk4/docker.img size: 40G Dec 17 16:46:10 Tower php: Btrfs v3.17.2#012See http://btrfs.wiki.kernel.org for more information.#012#012Turning ON incompat feature 'extref': increased hardlink limit per file to 65536#012fs created label (null) on /mnt/disk4/docker.img#012#011nodesize 16384 leafsize 16384 sectorsize 4096 size 40.00GiB Dec 17 16:46:10 Tower kernel: BTRFS: device fsid 54a96749-5677-4cbe-b5d6-4fc63ceed058 devid 1 transid 4 /dev/loop8 Dec 17 16:46:10 Tower kernel: BTRFS info (device loop8): disk space caching is enabled Dec 17 16:46:10 Tower kernel: BTRFS: flagging fs with big metadata feature Dec 17 16:46:10 Tower kernel: BTRFS: creating UUID tree Dec 17 16:46:10 Tower php: Resize '/var/lib/docker' of 'max' Dec 17 16:46:10 Tower php: starting docker ... Dec 17 16:46:10 Tower kernel: BTRFS: new size for /dev/loop8 is 42949672960 Dec 17 16:46:11 Tower php: Dec 17 16:49:31 Tower ntpd_intres[1541]: host name not found: pool.ntp.org Dec 17 16:49:31 Tower ntpd_intres[1541]: host name not found: pool.ntp.org
  21. I'm having this same issue. However, I did not update from a previous version of Unraid. The stick has been formatted and a fresh install of 6b12. I'm using https://github.com/smdion/docker-containers/tree/templates for the templates. Using instructions listed here http://lime-technology.com/forum/index.php?topic=35490.msg331564#msg331564 When i hit the "big green +" to add a container from that repo, the "Select a Template" drop down is blank. Any help would be great. Thank you.
  22. I did find the post that you had about deleting dockerman. I deleted dockerman and then reset my system. However the folder comes back i assume that its supposed to. https://www.dropbox.com/s/43llxpo51uu583u/Lack%20of%20dockerman.jpg?dl=0 There is no plugin called dockerman in my installed plugin screen. However in my plugins folder on the flash drive there is a dockerman folder, with a file "template-repos" this file says its 1kb. I've checked the permissions with this file there are no restrictions placed on it either. Dec 16 18:50:33 Tower php: Creating new image file for Docker: /mnt/disk1/docker.img size: 10G Dec 16 18:50:33 Tower php: Btrfs v3.17.2#012See http://btrfs.wiki.kernel.org for more information.#012#012Turning ON incompat feature 'extref': increased hardlink limit per file to 65536#012fs created label (null) on /mnt/disk1/docker.img#012#011nodesize 16384 leafsize 16384 sectorsize 4096 size 10.00GiB Dec 16 18:50:33 Tower kernel: BTRFS: device fsid 93bd42c9-90a2-46ed-86e4-ea2fb39b2b00 devid 1 transid 4 /dev/loop8 Dec 16 18:50:33 Tower kernel: BTRFS info (device loop8): disk space caching is enabled Dec 16 18:50:33 Tower kernel: BTRFS: flagging fs with big metadata feature Dec 16 18:50:33 Tower kernel: BTRFS: creating UUID tree Dec 16 18:50:33 Tower php: Resize '/var/lib/docker' of 'max' Dec 16 18:50:33 Tower php: starting docker ... Dec 16 18:50:33 Tower kernel: BTRFS: new size for /dev/loop8 is 10737418240 Dec 16 18:50:34 Tower php: Dec 16 18:52:48 Tower ntpd_intres[1541]: host name not found: pool.ntp.org Dec 16 18:52:48 Tower ntpd_intres[1541]: host name not found: pool.ntp.org Dec 16 19:08:51 Tower ntpd_intres[1541]: host name not found: pool.ntp.org Dec 16 19:08:51 Tower ntpd_intres[1541]: host name not found: pool.ntp.org Dec 16 19:24:55 Tower ntpd_intres[1541]: host name not found: pool.ntp.org Dec 16 19:24:55 Tower ntpd_intres[1541]: host name not found: pool.ntp.org Dec 16 19:40:58 Tower ntpd_intres[1541]: host name not found: pool.ntp.org Dec 16 19:40:58 Tower ntpd_intres[1541]: host name not found: pool.ntp.org From the log file. not sure if that will help. if you need the whole thing let me know.
  23. I used to run 4.7. However i formatted that thumb drive and did a complete reinstall of unraid 6.0 beta 12 So there should be no problems with that. Even the drive (Disk 1) is a new drive that the image is sent to. https://www.dropbox.com/s/zx45t4wolty4dja/Template%20drop%20down.jpg?dl=0 No templates in the template drop down.