SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 02-13-2014, 10:48 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by graywolf View Post
YES please
This doesn't change the file properties but here is some Groovy code that will output a list of potentially problematic files to a text file. The files outputted are files where the difference between the last modified timestamp and the end of the recording are greater than 600 seconds, or 10 minutes. Make sure you have a c:\temp folder or else it may fail. You may need to add the two Java API libraries cited to your libs folder. I run this from the Groovy Dev Environment created by Slugger but you could run it manually as a job against a file in SJQ - but it doesn't actually use any of the properties of a file.

Code:
import org.apache.commons.io.FilenameUtils
import java.text.SimpleDateFormat
def LogFile= new File("c:\\temp\\timeprobs.log")

MediaFileAPI.GetMediaFiles('T').each {
    def MFType=MediaFileAPI.GetMediaFileMetadata(it,"MediaType")
    def Filename=MediaFileAPI.GetFileForSegment(it, 0)
    def Airing=  MediaFileAPI.GetMediaFileAiring(it)
    def AirEnd=AiringAPI.GetAiringEndTime(Airing)
    def AirEnd2=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a").format(AirEnd)
    def LastMod=Filename.lastModified()
    def LastMod2= new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a").format(LastMod)
    def episodename = ShowAPI.GetShowEpisode(it)
    def Title= ShowAPI.GetShowTitle(it)
    def timediff=(LastMod-AirEnd)/1000
    def TimeProb =( timediff.abs() < 600)
    if (!TimeProb) LogFile.append("$timediff, $Filename, $MFType, $Title, $episodename, $AirEnd2, $LastMod2, $TimeProb\r\n")

}
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
Reply


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
Moving files and Metadata wayner SageTV Software 4 02-05-2013 12:29 PM
6.6.2 timeline off on converted files troycheek SageTV Software 3 09-04-2009 09:37 AM
Moving Files HokiePerogi SageTV Linux 2 11-17-2008 10:28 PM
Missing timeline on m2ts files on HD100 Sam SageTV Media Extender 0 08-22-2008 12:33 PM
Help with moving files silentmonolith SageTV Software 1 10-18-2006 09:00 PM


All times are GMT -6. The time now is 03:12 PM.


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