SageTV Community  

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

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-14-2007, 10:42 AM
perfessor101 perfessor101 is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: Vancouver, British Columbia, Canada
Posts: 246
SageTV Orphan Mpg's any easy way to find them?

Hello,

I was curious if anyone had a simple automated way to find orphaned SageTV recorded mpg's so I can deal with them appropriately.

There are too many to hunt through manually it seems and the Imported Videos listing sometimes lists videos that are still listed under SageTV Recordings retaining their EPG information under the SageTV Recodings pane, although the listing under Imported Videos does not have the EPG information for those same mpg files.

Periodically Windows XP MCE will not reconnect my local network drives that I record to and if I don't catch it that day SageTV has a tendancy to remove the EPG information for a few shows each time.

the SageTV server is called \\An72
the recording drives are \\An72\tv4, \\An72\tv5, \\An72\tv6

Somehow Windows XP MCE 2005 OEM with all current updates doesn't want to see itself?

Thanks for your time,
Bobby
__________________
SageTV Server: Windows 7 64Bit, Phenom II X6 1090T, Asus M4A89GTD-PRO/USB3 (AM3), ATI Radeon HD 4290, 2 x KHX1600C9D3/4GX, 4 x HD-PVR2 Gaming, , 4 x 320GB recording drives, 2 x USB-UIRT, SageTV Server Beta
SageTV Client & 2 x HD-300 Extender.
40.8TB unRaid 6.6.5 media server
Reply With Quote
  #2  
Old 01-14-2007, 01:37 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
If you create XML files for your recordings using Nielm's sageinfo xml generator you can use a script like this. I know Nielm creates a XML file for each recording in the SageDB that exists in your sage folders.



CheckOrphanXML.vbs

path="\\An72\tv4"
extension="xml"
on error resume next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
set fso = CreateObject("Scripting.FileSystemObject")
set files = fso.GetFolder(path).Files
for each file in files
if right(file.name,3)="mpg" or right(file.name,3)="avi" then
xmilfile=file & "." & extension
Set fso = CreateObject("Scripting.FileSystemObject")
Set filesys = CreateObject("Scripting.FileSystemObject")
if (FSO.FileExists(xmilfile)) then

else

filesys.CreateTextFile "C:\orphan.txt", True
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("C:\orphan.txt", ForAppending,TristateFalse)
f.Write file
F.Write VbCrLf

end if
end if
next
f.close
msgbox "Done check C:\orphan.txt"
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #3  
Old 01-14-2007, 03:30 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Have you tried the Partial Recordings View in Sage?
Reply With Quote
  #4  
Old 01-14-2007, 03:41 PM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by perfessor101
Periodically Windows XP MCE will not reconnect my local network drives that I record to and if I don't catch it that day SageTV has a tendancy to remove the EPG information for a few shows each time.

the SageTV server is called \\An72
the recording drives are \\An72\tv4, \\An72\tv5, \\An72\tv6

Somehow Windows XP MCE 2005 OEM with all current updates doesn't want to see itself?
Just to give you a possible cause for this, UNC paths to the local host will only work when there is a functional LAN. Unplug the LAN cable, and all local UNC paths will fail! (It seems that the server name resolution needs a LAN, even though the actual disk IO does not... Stupid, huh!).

I found this out when my home router died, and Sage suddenly became no longer able to record or even play back anything (and I was shouting at it: "its on the local disk for ****'s sake!")

So, if you find out why your MCE machine's LAN is going offline then you may solve your problem at source...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #5  
Old 01-16-2007, 11:46 AM
perfessor101 perfessor101 is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: Vancouver, British Columbia, Canada
Posts: 246
I've got 50 orphans ... at 2 - 3 GB a pop ... last week none ...

Hey, thanks ...

I finally got a count on the orphaned files ... 50 of them so far.

I've been trying out the Read and Write .my files Import by JREkiwi.
I output .my files for all files in SageRecordings that have EPG info.
I used a simple batch file to list all mpg's with no matching .my files.
The first five files I've done an IMDB search on have no Episode information for the shows with missing EPG information ;-( I'll try more later ... maybe I'll search on tv.com and make some manual .my files for those recordings.

Hmmm ... if SageTV only held onto the Recordings info for a week before it deleted it from the wiz.bin ... or retained the link to the file ...

(I started out trying this first ... now I'll start trying nyplayers suggestion)

Stanger89 ... I tried the partial recordings view ... didn't list anything.
These are complete recordings some 6 months old that somehow dropped their EPG info over the last week and wound up as Imported Videos because they were sitting in a recording directory with (now) no EPG info?


Windows XP seems to be great fun when trying to get it to reconnect (even local) UNC paths after a reboot. I changed my startup and shutdown scripts yet again and hope I have finally found the right combination. I do a daily reboot of my SageTV Server (windows xp mce doesn't seem to corrupt things as fast) and my guess is that either on startup or shutdown SageTV had an unstable connection to the UNC paths resulting in it thinking the files no longer existed. This is a Windows XP issue or just My Issue with XP. One problem I finally guesterated at was on shutdown if a program requests a UNC path directory listing Windows XP will respond with a partial listing, causing the software that requested the directory listing to think there are files that no longer exist ... although windows xp will still allow deletions from that UNC directory path (Urp).

I'll copy 500GB's of files from the SageTV server to my testing NAS without any known errors. I have as of yet to find any software that I can torture test my lan with and cause it to fail. So on the lan level I'm not sure what else to check ... I've tried two routers, a hub, two different switches, cat6, cat5, and I think a cat5e cable (some fast ethernet, some gigabit) and it all seems to work, albeit at different speeds depending on whats connected and what it's connected to.

I'll keep pluggin along ...

Bobby
__________________
SageTV Server: Windows 7 64Bit, Phenom II X6 1090T, Asus M4A89GTD-PRO/USB3 (AM3), ATI Radeon HD 4290, 2 x KHX1600C9D3/4GX, 4 x HD-PVR2 Gaming, , 4 x 320GB recording drives, 2 x USB-UIRT, SageTV Server Beta
SageTV Client & 2 x HD-300 Extender.
40.8TB unRaid 6.6.5 media 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


All times are GMT -6. The time now is 07:05 PM.


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