|
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
|
|||
|
|||
Get list of MediaFiles imported/modified/removed after certain date?
I am considering creating a plugin that will need to obtain and store extra metadata for MediaFiles so it will be necessary to keep this in "sync" with external file changes as well as additions and removals from the Sage database. Is there an easy way to get a list of files that have been modified and added or removed from the database after a certain date? Or is there a better way to keep track of this? Thanks.
__________________
-Craig |
#2
|
||||
|
||||
There is no date stamp in the database that tracks modifications to the metadata. Changes to custom metadata properties will cause a .properties file to be written or updated, altering its revision date.
I'm not completely clear on what you're trying to do, but your best bet is probably to store your custom metadata directly in the database using Get/SetMediaFileMetadata rather than trying to keep in sync with an external database. If you need an additional date stamp, you can use those methods to create one (but of course only your code will know about it or update it).
__________________
-- Greg |
#3
|
||||
|
||||
BMT updates a custom field, ScrapedDate, when it automatically fetches metadata for an item... but nothing else knows about that field.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#4
|
|||
|
|||
This would primarily be image files where the metadata is stored inside the file itself. So, mainly I am interested in when the file is modified by an external program and "refreshed" when the import directory is re-scanned by Sage without having to loop through all the MediaFiles and checking the (external) actual file modification date. I am interested in when files are removed so that I wouldn't be storing unnecessary information. Thanks for your help.
__________________
-Craig |
#5
|
||||
|
||||
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#6
|
|||
|
|||
Thanks - I'll look into that.
__________________
-Craig |
#7
|
||||
|
||||
Monitoring those events is not a guarantee that you'll see all additions and removals, since the user always has the option of disabling your plugin temporarily.
__________________
-- Greg |
#8
|
|||
|
|||
Good point. You could always run a java timer (You like that stuckless ). To run through and compare every night or user given time.
|
#9
|
||||
|
||||
That can probably be managed in the code as well.... but personally, if users are disabling your plugin, then they can't expect the plugin to do what it's supposed to do when it's disabled. As a standard measure, you'd probably want to add a config option (ie, button) that enables your plugin to perform a full audit, that users can use if they feel their collection is out of sync.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Allow creation of MediaFiles Objects w/o an actual media file | evilpenguin | SageTV Studio | 13 | 04-21-2011 11:57 AM |
Export a list of imported videos | [JiF]Mike | SageTV Software | 3 | 02-19-2008 04:20 PM |
Imported Folders Removed, Contents Still Listed?? | KJake | SageTV Beta Test Software | 5 | 07-10-2007 05:44 AM |
List .MKV files on Imported videos | Jabroni | SageTV Software | 1 | 12-26-2006 10:38 PM |
More Upto date customisable properties list | danward79 | SageTV Software | 0 | 01-02-2004 11:11 AM |