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 11-14-2007, 08:14 PM
steingra steingra is offline
Sage Aficionado
 
Join Date: Oct 2005
Posts: 427
Send a message via MSN to steingra
Making list of all recordings?

Hi all,

I am hoping someone can explain to me how I can get a list of all recordings in my sagetv database. I just want the filename property to be in my exported list. Is there anyway to do this with a script or from Studio?

Files:
\\vader\video4\NFLFootball-ChicagoBearsatStLouisRams-5492147-0.mpg
\\vader\video4\NFLFootball-ChicagoBearsatStLouisRams-5492147-0.mpg
\\vader\video4\NFLFootball-ChicagoBearsatDetroit-12234543-0.mpg
...
\\deathstar1\video1\Someshowname.mpg
\\deathstar1\video1\SomeOtherShowname.mpg
...

If I had a list like that, it will help me in my quest. Im just hoping there is an easy way to make this list without digging into the API's and writing my own code. Maybe someone has already done this before?

Im about to embark on a mission to clean up a lot of problems (due to faulty hard drives or other hardware issues that are plauging my network) and it would be nice if I could just have a list in xls format that I can print off and see where all my files are listed at in sagetv.

I have been reading the FAQ's and such, to start moving files from one recording directory to other directories. I think I am ready to do it. I have installed new larger hard drives in my NasLite server...and now I just would like this list/printout so I can see where they are all at and check them off my list as I go along.

Thanks once again, for any advice.

Last edited by steingra; 11-14-2007 at 08:16 PM.
Reply With Quote
  #2  
Old 11-14-2007, 08:21 PM
naln's Avatar
naln naln is offline
Sage Advanced User
 
Join Date: Aug 2004
Location: KY
Posts: 236
how about using external applications like directory lister? I use it to make a list of stuff on my HD from time to time....but yes-its not automatic...still relatively quick all the same....
__________________
Sage Server: Antec Solo, Seasonic S12 430W, AM2 3800, Gigabyte GA-M61P-S3 Mobo, XFX 7600GS 512MB, 2GB DDR2 800, 3 TB SATA, Hauppauge HVR1600, HDHR, indoor antenna, Win 7 Ultimate, MCE05 remote.
Sage Client: Foxconn NT330i Intel Atom Dual Core, 1 GB DDR2 667 RAM, Windows 7 Ultimate.
Reply With Quote
  #3  
Old 11-14-2007, 08:54 PM
steingra steingra is offline
Sage Aficionado
 
Join Date: Oct 2005
Posts: 427
Send a message via MSN to steingra
Quote:
Originally Posted by naln View Post
how about using external applications like directory lister? I use it to make a list of stuff on my HD from time to time....but yes-its not automatic...still relatively quick all the same....
Well I need to read the information contained inside sagetv...:-) since I have multiple servers (6 of them) and lots of files all over a bunch of drives.

I wanted to get the information from sagetv and export it from there.
Reply With Quote
  #4  
Old 11-14-2007, 09:45 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
FilterByBoolMethod(GetMediaFiles(),"IsTVFile") should (if my syntax is correct) return a list of all recordings.

GetFileForSegment(MediaFile,int) will return the file ( filename/path string) for the "int"th segement of each MediaFile returned by the above.
Reply With Quote
  #5  
Old 11-15-2007, 09:34 AM
steingra steingra is offline
Sage Aficionado
 
Join Date: Oct 2005
Posts: 427
Send a message via MSN to steingra
Quote:
Originally Posted by stanger89 View Post
GetFileForSegment(MediaFile,int) will return the file ( filename/path string) for the "int"th segement of each MediaFile returned by the above.
This would be needed if the file was recorded in more than one part? I think all my shows are just one file.

Quote:
Originally Posted by stanger89 View Post
FilterByBoolMethod(GetMediaFiles(),"IsTVFile") should (if my syntax is correct) return a list of all recordings.
Can I run this from within Studio easily? Or do I need to make a program that does it? Sorry I havent experimented with SageTV Studio (yet). A few months ago I started looking at the API's...but I never got any further. Too many work demands lately. Just dont have the extra *ooomph* I need to dig into another technical system. Hoping there is an easy way to implement this little puppy.

Thank you.
Reply With Quote
  #6  
Old 11-15-2007, 10:44 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Quote:
Originally Posted by steingra View Post
This would be needed if the file was recorded in more than one part? I think all my shows are just one file.
Then you'd just specify 0 for the number. GetMediaFiles returns media file objects not filenames, GetFileForSegment returns the filename for each mediafile object.

Quote:
Can I run this from within Studio easily? Or do I need to make a program that does it? Sorry I havent experimented with SageTV Studio (yet). A few months ago I started looking at the API's...but I never got any further. Too many work demands lately. Just dont have the extra *ooomph* I need to dig into another technical system. Hoping there is an easy way to implement this little puppy.

Thank you.
That's the raw API, it's easiest to run that directly from an STV. Probably create a button, and put that code under it. What's not there is anything to write that list to a file. Actually if you're just experimenting, you can run that from the Execute line option in Studio.
Reply With Quote
  #7  
Old 11-15-2007, 10:45 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
steingra ,

If you use the Nielm webbroswer you can create a XMl file with all the recordings then you can use a vbscript or something else to get the file names.
If you use the web browser here is a simple script that will do what you want.
Just change recordingsxml to your path. It will create a recordings.txt in c:\temp

Code:
recordingsxml="C:\wget\Movefiles\recordings.xml"

Const ForReading = 1, ForWriting = 2, ForAppending = 8
set fso = CreateObject("Scripting.FileSystemObject")
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists("C:\temp") Then
    Else
    ParentFolder = "C:\" 
set objShell = CreateObject("Shell.Application")
set objFolder = objShell.NameSpace(ParentFolder) 
objFolder.NewFolder "temp"
End If
Set fso = CreateObject("Scripting.FileSystemObject")
Set filesys = CreateObject("Scripting.FileSystemObject")
filesys.CreateTextFile "c:\temp\recordings.txt", true
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("c:\temp\recordings.txt", ForAppending,TristateFalse)
Dim Fso      : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim TextFile : TextFile = recordingsxml
Dim StrLine, Ts
  Set Ts = Fso.OpenTextFile(TextFile,ForReading)
   Do Until Ts.AtEndOfStream
    StrLine = Ts.ReadLine
strSearchThis=StrLine
if instr(strSearchThis, "filePath") > 0 then
arr=split(StrLine,"filePath=")
StrLine=arr(0)
dim arr2
arr2=split(arr(1),"startTime")
StrLine=arr2(0)
f.write StrLine
f.Write VbCrLf
    else
end if
Loop
f.close
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 11-15-2007 at 01:21 PM.
Reply With Quote
  #8  
Old 11-15-2007, 02:43 PM
steingra steingra is offline
Sage Aficionado
 
Join Date: Oct 2005
Posts: 427
Send a message via MSN to steingra
Quote:
Originally Posted by nyplayer View Post
steingra ,

If you use the Nielm webbroswer you can create a XMl file with all the recordings then you can use a vbscript or something else to get the file names. If you use the web browser here is a simple script that will do what you want. Just change recordingsxml to your path. It will create a recordings.txt in c:\temp
Yes I have Nielm webserver installed. I dont see any option to create an xml file?? Where do I find that option? I thought I remembered seeing it in the SageTV Web Interface from Nielm's web server...but after taking a closer look, dont see it. hmmmmm

Last edited by steingra; 11-15-2007 at 03:38 PM.
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
SageTV V6.2.6 Release Candidate is Ready! Narflex SageTV Beta Test Software 3 08-25-2007 11:00 PM
Show in Recordings list but have actually been deleted. GollyJer SageTV Software 2 05-30-2007 11:08 PM
Is there a minimum time before manual recordings will delete? popechild SageTV Software 24 12-06-2006 06:18 PM
Sage Recordings list sometimes causes a 'freeze' pscs SageTV Beta Test Software 0 05-10-2003 04:59 PM


All times are GMT -6. The time now is 04:43 AM.


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