SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search


SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Thread Tools Search this Thread Display Modes
Old 02-23-2010, 08:09 AM
SageDonkey SageDonkey is offline
Sage User
Join Date: Mar 2006
Posts: 37
Arrow Utility: Unraid Spin Up

This may exist (or maybe there is a better way to do this), but it took me 15 minutes to put together and so far has been working great for the past couple of days, so I thought I'd share:

I just moved all my Movies, Music, and Pictures to a new Unraid server. I did it pretty quietly (parts shipped to office, assembly done in secret), but the wife did notice 1 thing - whenever she went to watch a movie or listen to music, there was an extra long pause before it started (the time it takes for Unraid to spin up the right disks). After taking a short look, I wrote a quick utility that would spin up the disks (using an HTTP call to the Unraid admin screen) anytime someone went into the Video Library Screen, Music Library Screen, or Picture Library Screen. By the time she makes a selection, the disk has spun up fully and the start is instantaneous - crisis averted.

- Java 6 (not completely required, but as packaged, its compiled to Java 6)
- Sage MC using the Dynamic Menus

- Download the attached zip and copy the jar into the JARs directory
- Open your sagemc_menu.xml file (if you don't know where that is, goto the Sage MC home screen, click Options, Select "Main Menu Options", select "File", and there should be a "Current menu file: ...path_on_your_machine/
- Find the screen that you want to trigger the Spin Up and add (example below is to spin up the disks when video library is selected from the main screen):
<internalScreenMenuItem icon="hover_my videos.png" screen="Video Library Folder View" title="My Videos">
   <evalExpression>DebugLog("UNRAID Spin Up Result:" + unraid_Utility_SpinUpDisks("","unraid_username","unraid_password"))</evalExpression>
-Restart SageTV (including the server if you have extenders that want to use this)
-Goto Videos screen, then check you Unraid management page - you should see all disks spun up. If not, turn on debugging and see what HTTP response code you got back.

Other Thoughts
- You don't need the DebugLog call, its just handy for troubleshooting. The code will spit back the HTTP response code.
- Yes - I know the password is in plain text...unraid's admin stuff isn't that secure anyway (especially if you have unmenu installed)
- Yes - There are other ways to the video/music/pictures screen, but we tend to always go Home Screen -> Movies. The best place would probably be a hook on the screen itself, but then I would have to hook in all the possible screens (Movie Walls, etc).
- Source code is in the jar. Its not much - change it, burn it, whatever - its yours to keep.
- Also included a Spin Down method. Not sure when I will use it, but its there.
Attached Files
File Type: zip (2.5 KB, 343 views)
Reply With Quote
Old 06-01-2010, 07:22 AM
reggie14 reggie14 is offline
Join Date: Aug 2003
Location: Maryland
Posts: 2,760
Do you have any plans to update this plugin for Sage v7?

I have an unRAID server sitting in my closet with all my media already on it, but because I've been concerned about spin-up times I have re-pointed my server to unRAID for imported media. I know when I browse the the shared folders on the unRAID server it can take several seconds for the drives to spin-up, or at least I have to wait several seconds until I see the files in the folder. Before you created this utility how bad was it?

I suppose its easy enough for me to try. I don't know why I haven't done that yet.
Reply With Quote
Old 09-24-2010, 08:39 AM
madpoet madpoet is offline
Sage Aficionado
Join Date: Sep 2003
Posts: 262
Following up on this... any possibility of a v7 update?
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
whs or unraid? rwc SageTV Software 28 09-18-2010 10:16 AM
SageTV and RAID Spin-Down / staggered Spin-up dcardellini Hardware Support 7 10-28-2008 08:25 PM
Sagetv and disk spin down? mohanman SageTV Software 13 05-23-2007 08:54 AM
Naslite+ v2 or unRaid v3 BBCritical General Discussion 18 01-25-2007 12:23 PM
Drive spin-down - impact? stevech Hardware Support 17 01-31-2006 01:58 PM

All times are GMT -6. The time now is 01:04 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.