|
Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Using BMT to prevent recordings of specific episodes?
Hi there,
I don't know if this is the right place to post this question. If it isn't, then I apologize. I posted about this earlier in the main software thread (http://forums.sagetv.com/forums/showthread.php?t=54137), but the feedback I got makes me wonder if BMT can be used to solve my issue. I have a bunch of episodes ripped from my various DVD collections. I want to also have scheduled recordings setup for these same shows. I am trying to get SageTV to record episodes that I don't already have ripped and then ignore the episodes that I do have ripped. I know I could just let SageTV record the dupes, and then manually delete them myself. However this seems like it will be a pain. I wonder, instead, if there is a way I can use BMT to add entries into my wiz.bin for all my ripped episodes. Maybe I can find some sort of 'airingID' online for a specific episode? Then I can add that to the wiz.bin somehow? Any help would be appreciated Les |
#2
|
||||
|
||||
Unfortunately, this is not is possible today, with bmt. For that to happen, the imported TV shows would have to be associated with an Airing in the EPG, and then we'd have to set call SetWarched on it, so that sagetv doesn't try to record it. While BMT does import other media as recordings, it does not associate it with actual airings from the guide data. Sage has no idea that your imported shows are the same as those in the guide.
__________________
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 |
#3
|
|||
|
|||
Quote:
Thank you for that information. While BMT won't directly be able to help me with this, maybe your knowledge can help me a bit more ... I have not done any plugin work for SageTV (yet), but I am a programmer by profession. I figured it was only a matter of time before get obsessed with SageTV enough to want to start working with SageStudio. Maybe that time is now In theory, given a specific TV show and episode, I could find this 'airing info' online? What kind of airing info do I need to find? Is there some sort of unified ID system that all EPG systems utilize? I guess really what are the data types of the parameters for this SetWatched call? Again, your knowledge on this matter would really be appreciated. In the main time, I am gonna start reading the docs on SageStudio. Thanks Les |
#4
|
||||
|
||||
Quote:
For a given show, iterate through all the sage airings and find a match based on series title and the episode name. If you find a matching airing, then call SetMediaFileAiring(MediaFile, AIring) to set this Airing as the airing for the show. Doing this should prevent sagetv from recording it. The larger issue arises in that the sage guide data has 14 days of airing info, and if the show that you are looking for is not in the guide, then you'll have to periodically check the guide to see if the airing get added to guide via a guide update, and if so, then update the mediafile now that that the airing has arrived.
__________________
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 |
#5
|
|||
|
|||
Quote:
Quote:
Thank you again |
#6
|
||||
|
||||
I mention Java, because studio is primarily the UI language, which Java is the backend language. ie, if you are doing a UI mod, then Studio would be the right choice, but if you are going non-ui mod, then perhaps java would be the better choice. But, that being said, you can do some real programming using studio, and it does allow you to create/use java object, call methods, etc. (I'm not a studio developer)
For plugin development, I'd start with the studio sub forum and look at the links there, etc, and definately read the pdf you are currently reading Creating an Airing that "looks" like the Airing that sagetv wants, unfortunately, isn't going to cut it. YOu'll need to ensure that the Airing that you create has the same showid and zaptoit id that sagetv would use, which is why I suggest finding it in the list of "known" airings. Every mediafile has an Airing associated with it, but not all Airings are in the EPG data. The best way to prevent sagetv from recording a show is to simply make it think that it has already recorded the show, but assigning a physical file, the Airing that it would have recorded from the guide.
__________________
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
|
|||
|
|||
Quote:
|
#8
|
|||
|
|||
Quote:
I am a bit confused about your last post. It sounded like you were saying that you don't use SageStudio at all. That you instead create a completely separate stand alone java project (like in Eclipse or some other IDE). Is that what you were saying? Or did I completely misunderstand? If that is what you are doing, where did you get the Sage library to link with? I found that java can be used in SageStudio (like you mentioned) and that there are some specific Sage hooks that be referenced (basically a method overload), but I didn't see anything that suggested the ability to create a project outside of SageStudio. Thank you again for your time |
#9
|
|||
|
|||
Quote:
Quote:
Quote:
For what you're looking to do, a Java plugin is definitely the way to go. Good luck!
__________________
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... |
#10
|
||||
|
||||
I think Slugger summed it up nicely for me
(with the addition that I prefer Stuckless's sagex-apis, since they allow me to run entirely in an eclipse environment )
__________________
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 |
#11
|
|||
|
|||
and you know... you wrote them
__________________
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 |
#12
|
|||
|
|||
Hi guys,
Wow, I find that pretty amazing that Sage gives us the library like that. I can't wait to get in there and start poking at stuff. Guess I need to brush up on my Java Luckily it's not really that different then C++. Thanks again for your help guys Les |
#13
|
||||
|
||||
Probably the best way to implement this would be to trigger on the EPGUpdateCompleted event. Iterate through the EPG data, and match show title and episode title to existing imports, and if found, mark the EPG airing as watched.
Or, you may be able to gleem the ID info from Zap2it for a show/episode, and make sure your imports use the proper ExternalID. I'm not sure if that is enough for sage to recognize the connection, but if it is, it would work.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#14
|
|||
|
|||
So I was digging through the sageAPI a bit last night. I was just trying to get a rough idea of the class structures (Airing, Show, MediaFile, etc).
I think I have a decent idea of how everything is organized, but would you mind taking a look at this very-much-pseudo code and let me know if I am on track or not? Code:
void OnEPGUpdate() { MediaFile[] allMediaFilesInDatabase = GetMediaFiles("VL"); //do i want "VL" or "TVL"? for(i = 0; i < allMediaFilesInDatabase.size; i++) { Airing mediaFileAiring = GetMediaFileAiring(allMediaFilesInDatabase[i]); Show mediaFileShow = GetShow(mediaFileAiring); //as long as i use BMT to setup my the meta data for all my media files //then this Show should have a valid TV Show Name and Episode Name right? Airing[] allComingUpAiringsForShow = GetAiringsForShow(mediaFileShow, 0); //i dont know if this will work or not. like i mentioned in the comment above, //the Show object for my mediaFile should have proper media data (in terms of names) //but will this GetAiringsForShow work off of the names data or some sort of Zap2it data thing? for(i = 0; i < allComingUpAiringsForShow.size; i++) { SetWatched(allComingUpAiringsForShow[i]); } } } It sounds too easy. If this code really worked, it seems like I wouldn't even have a problem to begin with. Is my call to GetAiringsForShow even going to return anything? Thanks again Les Last edited by les_bloom; 02-23-2011 at 05:24 PM. |
#15
|
||||
|
||||
les, i think the pseudo logic is close, but more like this...
Code:
public updateAiringsForRecordings() { Object recordings = MediaFileAPI.GetMediaFiles("T"); for (Object rec: recordings) { String series = MediaFileAPI.GetTitle(rec); String epname = MediaFileAPI.GetEpisdoeName(rec); String showid = ShowAPI.GetShowId(rec); if (showid.charAt(2)=='m' && showid.charAt(3)=='t') { // bmt imported show, so lets find a matching airing Object airing = findAiring(series, epname); if (airing !=null) { MediaFileAPI.SetMediaFileAiring(rec, airing); } } } } public Object findAiring(String title, String epname) { Object airings[] = GetAllEPGAirings(); // not show how, never done it for (Object a: airings) { if (title.equals(AiringAPI.GetAiringTitle(a) && epname.equals(ShowAPI.getEpsidoeName(a)) { return a; } } return null; } It's not foolproof because it requires that you match based on the import series name and episode title.
__________________
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 |
#16
|
|||
|
|||
hello again stuckless,
Quote:
Quote:
In addition to creating this link, don't I need to set the EPG airing as watched? So that it won't record the airing? Quote:
Thank you again for your time |
#17
|
|||
|
|||
For getting all airings from the EPG, I think it's something like this: ?
Code:
Channel[] allChannels = ChannelAPI.GetAllChannels(); for(i = 0; i < allChannels.size; i++) { Airing[] allAirings = Database.GetAiringsOnChannelAtTime(allChannels[i], startTime, endTime, false); //any idea about the times? that seconds, minutes, what? //also, these Database calls are limited to a return size of 1000. i presume //they will return the earliest airings first, and since this code will get run //once a day, that shouldnt matter /// do comparison code } |
#18
|
|||||
|
|||||
Quote:
Quote:
Quote:
Quote:
Quote:
I think start and end times are Dates as a long. ie, you'd need to specify the date/time as a long. Good luck... and make backups of you wiz.bin... you are about to mess it up pretty good
__________________
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 |
Can you prevent recordings during certain hours? | Ralphjb | SageTV Software | 16 | 10-19-2010 08:01 PM |
SageTV Recordings: Missing Episodes? | PeteCress | SageTV Software | 1 | 05-24-2010 07:42 PM |
Directing recordings to specific directories | tvmaster2 | SageTV Software | 1 | 10-22-2009 05:48 PM |
tv recordings to specific location | npereira | SageTV Software | 3 | 03-17-2008 07:33 AM |
Prevent recording a favorite on a specific channel | BLS | SageTV Software | 4 | 08-29-2003 01:05 PM |