![]() |
|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Viewing History for Imported Videos?
Is there any way to get a viewing history for Imported Videos, even if the video has been deleted? I can see how the viewing history can be determined using Airings, but not for imported videos.
All I really need to determine is if a specific video has been imported sometime in the past but is now deleted.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#2
|
|||
|
|||
Quote:
Wouldn't really know what you would keep filename/showname/titlename it would be pretty hard. |
#3
|
||||
|
||||
I really do not want to keep track of it myself but I do not see a way of doing it otherwise.
I'm working on making the Malore Online Browser automatically record Podcasts that are selected as Favorites. I'm looking for a way to keep track of what's already been downloaded, I mean recorded ![]() I have figured out a way to uniquely identify Podcasts that have been downloaded so I can tell which podcasts are "new" and which are already in the library but this only works for files that are physically on the disk. Once you DeleteFile() for an imported video the Show metadata is also removed. (As far as I can tell. I was hoping I was wrong about this.) The other option I have is to make the downloaded podcasts Airings instead of imported media, but I'm not sure I like the idea of messing with the Airings portion of the database. I've spent several hours reading posts on the subject and it just seems to be a can or worms. Suggestions welcome. (Greg, this is where you can chime in and tell me what I'm doing that's stupid so I can get smarter ![]() Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#4
|
||||
|
||||
I don't really have much to add. You've pretty much answered your own question: once a video has been deleted from the import database, there's no record of it anymore. If you want to avoid downloading things twice, it's up to you to keep a record of what you've already downloaded. In your shoes I would do this in a separate file, without trying to shoehorn it into Wiz.bin.
__________________
-- Greg |
#5
|
||||
|
||||
That's what I'm thinking as well. Better I screw up my own .properties file instead of the wiz.bin
![]() On a somewhat related topic, I'm using java.util.Properties.load and .save to access a custom .properties file. When I save the file the properties are not saved alphabetically. I know there is a way to make the .properties file save alphabetically but I can't remember what it was. Do you know?
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#6
|
|||
|
|||
See this thread by me ran into the same issue
http://forums.sagetv.com/forums/showthread.php?t=46224 the next to last post by jriechen will tell you an example on how to save them sorted. |
#7
|
||||
|
||||
Thanks Plucky, I knew I saw this issue discussed befire but I could not find the answer. So the short answer is that it must be sorted manually.
![]()
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#8
|
|||
|
|||
no problem it isn't really hard to implement that Right before the save....but I agree you would think this would be something the property class would already do/support.
|
#9
|
|||
|
|||
here's some code to sort properties (put this in its own java file...):
Code:
import java.util.Collections; import java.util.Enumeration; import java.util.Properties; import java.util.Vector; public class SortedProperties extends Properties { public Enumeration keys() { Enumeration keysEnum = super.keys(); Vector<String> keyList = new Vector<String>(); while (keysEnum.hasMoreElements()) { keyList.add((String) keysEnum.nextElement()); } Collections.sort(keyList); return keyList.elements(); } } Code:
Properties props = new Properties(); Code:
SortedProperties props = new SortedProperties(); ![]() EDIT: While I'm sharing figured I'd just share the code that we use to save a property file (will save all property's in sage***.properties with a parent of parentprop)... Code:
public static boolean SaveSagePropertyFile(String filename, String parentprop, String DoNotSaveProps){ ArrayList propkeys = ortus.api.GetSagePropertyAndChildren(parentprop); SortedProperties props = new SortedProperties(); FileOutputStream propfile = null; String[] DoNotSavePropsArray = DoNotSaveProps.split(","); for (String s : DoNotSavePropsArray){ propkeys.remove(s); propkeys.remove(parentprop.concat("/").concat(s)); } ortus.api.DebugLog(LogLevel.Trace2, "SageSaveProperyFile, Props to save: " + propkeys); for (String propkey : (String[])propkeys.toArray(new String[0])){ props.setProperty(propkey, ortus.api.GetSageProperty(propkey, "")); } ortus.api.DebugLog(LogLevel.Info,"SageSavePropertyFile, Filename: " + filename); try{ propfile = new FileOutputStream(filename); props.store(propfile, "TVE Settings file"); propfile.close(); ortus.api.DebugLog(LogLevel.Info, "SageSavePropertyFile, Success"); return true; } catch(IOException ioe){ ortus.api.DebugLog(LogLevel.Error, "SageSavePropertyFile, I/O Exception: " + ioe); return false; } }
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer Last edited by razrsharpe; 05-04-2010 at 08:40 PM. |
#10
|
||||
|
||||
Thanks razrsharpe. I've got this on the "To Do" list once I get the new functionality actually working.
![]() Why is it that when you start on something the cycle goes something like this : 1 You first think "Wow, this will be a lot of work." 2 Next you think "It's really not so bad and it won't take too much time." 3 Next "Hmm, it's harder than I thought." 4 Next "Man, I forgot about that issue... and that issue... and that issue..." 5 Next "Holy crap, I'll never finish this." 6 Many, many hours later "Just a few more things to fix..." 7 More hours later "Only one or two things left to do." 8 More hours later "just one last thing to get right ..." 9 "Finally!" I'm on step 6 ![]()
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#11
|
|||
|
|||
Quote:
![]() |
#12
|
|||
|
|||
Quote:
![]() ![]()
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
#13
|
||||
|
||||
razrsharpe,
The SortedProperties class worked great. Thank you! I really appreciate all of the help you, Plucky, stuckless and Greg have given me. You all have saved me tons of time. Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#14
|
|||
|
|||
no prob
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
#15
|
|||
|
|||
Quote:
![]() |
#16
|
||||
|
||||
An update to this in case anybody needs the info in the future. I had to keep track of the viewing history manually. I did it by:
- Creating a unique string that identifies the Video. The string uses the show title, episode title, author, description and a few other items. Hopefully this results in a string that is unique for each show. This is not fool-proof, but it should do for what I am using it for. - Storing the strings in a custom .properties file. I'm actually using this to keep track of Podcasts that have been downloaded and imported into Sage's library. Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Viewing imported videos in the SageTV Recordings area | galeo | SageTV Customizations | 22 | 12-24-2007 08:34 PM |
Viewing Imported VIdeos by folder name? | kelemvor | SageTV Software | 6 | 02-17-2007 01:54 PM |
Please let me export my ratings/viewing-history. | TedHoward | SageTV Software | 1 | 02-28-2005 03:13 AM |