|
SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Plugin: Sage Artifact Delete (SAD)
Just added this plugin to the repository. It's a simple plugin that listens for MediaFileRemoved events and deletes any artifacts (edl, txt, log, etc.) it can find for the media file just deleted. The current version has the following features:
Feedback, etc. welcomed in this thread.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... Last edited by Slugger; 05-22-2010 at 11:53 PM. |
#2
|
||||
|
||||
Quote:
Also I foresee issues with converted files in which people might want to delete the original but keep the conversion (even if it's not a MediaFile). So my suggestion would be to have a configurable list of extensions that SAD is allowed to delete (be they files or directories). The default could be *, but users could make it more restrictive if they like.
__________________
-- Greg |
#3
|
||||
|
||||
The old file cleaner didn't work with xml files generated with Nielm's XML generator.
This one seems to work great, I can now remove a script that I run every day. Cheers |
#4
|
|||
|
|||
New beta ready
A new beta will be in the repository shortly. Lots of new features added:
* Add ability to restrict deleted artifacts by file extension * Add ability to ignore artifacts by file extension * Add ability to delete artifact directories with extension filter and ignore lists * Add artifact finder (mainly for testing/debugging purposes, but may be helpful to others)
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#5
|
|||
|
|||
The new beta build promised earlier has been delayed as I investigate a possible bug in the core. Though SAD can handle the multiple copies of the event, I'd rather wait and get confirmation of the bug before releasing anything else.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#6
|
||||
|
||||
That's cool... any thoughts on adding in fanart removal as well? I have it planned, but it's not on my radar... but at some point it has to be done. Thing is, i'll probably have to duplicate your efforts unless you add support for it
__________________
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 |
#7
|
|||
|
|||
Sean if you wanted me to I could port my old advanced fanart cleanup tool from sagemc. It seemed to work pretty well and would be pretty easy to automate with the same listener this is using. Of course I would need to check that no other shows exist with the title and that it is not a favorite (no need to delete if it is just going to be recorded again.)
|
#8
|
|||
|
|||
Quote:
Quote:
http://sagetv-addons.googlecode.com/svn/trunk/sad/
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#9
|
|||
|
|||
Quote:
I am guessing this fires on movies and tv correct? |
#10
|
|||
|
|||
Haven't actually tested this, but I would assume so. It should fire when any media file is deleted (tv, imported video, music, pic, etc.). Be aware that there appears to be a bug where the core fires this event twice. I've already submitted a bug report and am awaiting confirmation. Assuming the bug is in the core then I'll release the latest version to the repository later today. I say this because the version of the plugin in the repository right now is not even close (feature-wise) to what's in svn.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#11
|
|||
|
|||
Quote:
edit: Another caveat is I use Sagex and you use greg's api. I have never coded with his api but if you are against me adding a sagex dependency I suppose I can figure it out quick enough. Last edited by PLUCKYHD; 05-24-2010 at 08:52 AM. |
#12
|
|||
|
|||
Quote:
|
#13
|
|||
|
|||
Not against it, per se. Depends how you're going to do things. If you're going to isolate your code into a separate class then feel free to use sagex. If you're going to add directly to my code then I'd rather you use Greg's API (b/c it gets too confusing to read obj access through two different APIs in the same class file).
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#14
|
|||
|
|||
Quote:
edit: apache delete quietly very very nice never knew that existed would have saved me allot of code in the past of looping through files then deleting the directory. Plus if the setting is write I can just call the main fanart folder know for the known title and it will delete all directories. Wow learn something new everyday. Last edited by PLUCKYHD; 05-24-2010 at 09:23 AM. |
#15
|
|||
|
|||
I've confirmed the bug where the media file event is fired twice is indeed a bug with the core/default STV. Therefore I'm confident releasing the next version of this plugin. Plucky is working on adding fanart support and says he'll have something ready soon so I figure I'll wait for that patch before releasing the updated version. Should appear in the repository sometime today.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#16
|
||||
|
||||
Say I have both a foo.mpg and a foo.jpg in the same folder, and they both have artifacts (e.g. foo.mpg.properties and foo.jpg.properties). Will SAD be able to tell them apart, and not delete the foo.mpg.* artifacts when foo.jpg goes away? Or must I set up inclusion/exclusion rules for the cross-product of media type and artifact type?
__________________
-- Greg |
#17
|
|||
|
|||
Quote:
I could recognize that there are two media objects starting with foo. in the current dir, but that's all I can do. Reasonably, I suppose, I could assume that foo.jpg.* actually belongs to foo.jpg, but that's only a (logical) guess. There's no reason it couldn't be a generated jpg artifact from the .mpg object. There's just no end to the possibilities. To keep my sanity, the rule (with this plugin) is an object named foo.mpg has artifacts named foo.*. For tv/video I don't think this will be a problem. I suppose it could be a problem for import directories if one were to use the same dir for videos and pictures and then had a video named vacation.mpg and a pic named vacation.jpg. The best solution may be to optionally restrict the types of media this will delete artifacts for (basically introduce a media mask to prevent it from deleting artifacts for music, pics, etc.)?
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#18
|
|||
|
|||
v0.0.2 (beta) added to the repository. All the changes listed above are included except for fanart removal support. It's coming, but will be another day or two before it's ready.
NOTE: There is a known issue where deleting media objects in certain ways can cause the MediaFileRemoved event to fire twice. In this case SAD will queue the artifacts for deletion twice. Not a big deal as the first time it will delete them and the second time it will simply fail (because they're already deleted). Presumably, a future SageTV build will fix this issue. Enjoy.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#19
|
|||
|
|||
I think it would be a good idea to pre-configure everything for the user. If I'm installing this via my TV, there's no way that I want to put in all the extensions that should be cleaned up via the remote.
|
#20
|
|||
|
|||
It is preconfigured. By default it'll delete every extension (blank means delete them all).
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VRM9 Artifact Problem/FF/RW Freezes Video | OldPCGUY | SageTV Software | 6 | 10-15-2008 08:26 PM |
Am I the only sad one? | grooves12 | SageMC Custom Interface | 30 | 07-10-2008 04:19 PM |
How to delete multiple recordings or set it to auto delete? | batigol9 | SageTV Software | 24 | 11-10-2006 07:57 PM |
undesired artifact present on PBS' HD shows | stevech | SageTV Software | 2 | 04-13-2006 08:06 PM |
Any TimeWarner Cable user here have you seen this odd artifact | SHS | Hardware Support | 4 | 04-22-2005 02:57 PM |