|
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
|
||||
|
||||
Long ramble on AddShow, AddAiring, AddMediaFile
I am writing a webserver plugin to allow users to edit data for media files... This would allow people to add data to the DB for external media files. Some uses are:
A couple of things I have found so far from playing around in Studio...
I think therefore that: - When editing show data for, I should always re-create a new EPxxx (or perhaps MVxxx for movies), an airing for the show and then set it on the mediafile otherwise all recorded episodes of that show will be edited, and any Zap2It updates on the original EpisodeId will undo my changes... - When linking a file to an airing, I need to make sure the file has the correct start/stop times... This may involve changing the timestamp on the file and re-adding it (which will require renaming it) - When creating a new EPxxxxx, I need to avoid a number-clash with Zap2it, or with XMLTV With Zap2It, I can forsee big problems if I name-clash with Zap2It EpisodeId's -- they will effectivly undo any changes made, and may cause Sage to not record required episodes... I know XMLTV's format (8 digit hex produced from a hash of title+episode) From Zap2It's website I see that IDs are SH|EP followed by 10 decimal digits Is this also what's in Sage? So, my first questions are:
My next issue is regarding parental ratings in AddShow() I have seen that with AddShow I can add one of the ratings listed in the parental controls screen in the 'Rating' argument, and it gets handled correctly including prompting for the PIN... The Advisory Content seems to go as a String[] in the Expanded Ratings List (I successfully tested this using java_util_List_toArray(DataUnion("Graphic Violence","Language","Nudity"))... Next question is Actors in AddShow() -- PeopleList and RolesForPeopleList -- a slight problem, DataUnions do not work. I see that the AddShow in the EPG plugin uses a String[] and a byte[]... don't know how you can create a byte[] in Studio! Maybe it will work in Java...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki Last edited by nielm; 04-26-2005 at 12:55 AM. |
#2
|
||||
|
||||
I don't know what else to say about any of the rest of this, but my EPG data from Zap2It has show IDs with a prefix of MV, SH, or EP, followed by 10 digits -- just like you are seeing on the Zap2It website, I suppose.
- Andy |
#3
|
||||
|
||||
Found a nasty:
If you do a SetMediaFileShow on a MediaFile that has been Imported, it will disappear from the imported video library, and re-appear in the Archived Shows... But the next refresh finds the SAME media file again and re-adds it to the DB, so the same physical file has 2 MediaFile items...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#4
|
||||
|
||||
I wonder if that has to do with the fact that the media file ID is not appended to the end of the filename, so it doesn't see it as already being in the recording database? Maybe appending it to the filename would solve it for the time being...
- Andy |
#5
|
||||
|
||||
Quote:
Code:
java_util_List_toArray(DataUnion("Person1", "Person2", "Person3","Person4","Person5","Person6")) java_util_List_toArray(DataUnion("Actor", "Actress","Director", "Producer","Writer","Supporting Actor")) Code:
Actor Lead Actor Supporting Actor Actress Lead Actress Supporting Actress Guest Guest Star Director Producer Writer Choreographer Sports Figure Coach Host Executive Producer Artist
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#6
|
||||
|
||||
Quote:
If a file is added outside of any library directories, or was inside a TV directory, it is OK, it is only if the file is in a library directory that it will get re-added at next refresh.... It also happens on DVD's (which you cannot rename as the 'file' is the VIDEO_TS directory)...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki Last edited by nielm; 04-28-2005 at 12:27 PM. |
#7
|
||||
|
||||
And one last thing that got me...
You can create a duplicate airing (ie one that is on the same channel, at the same time but with a different EPGID) as an existing airing, but you cannot use this duplicate airing in a SetMediaFileAiring() call, if there is already a media file using the other airing in the DB. As an example, I wanted the new webserver edit show info module to work like this
Unfortunaly, the SetMediaFileAiring does not work, so I have to delete the old mediafile DB entry first...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#8
|
||||
|
||||
I noticed you're using the same naming format as SageTV. Just to let you know, the naming convention shouldn't affect anything. You should be able to name the files anyway you want and it'll have no effect on SageTV.
I found & fixed the bug where you'd get duplicate files. I assume this was only happening when you used Show ExternalIDs that started with SP, EP, SH or MV, right? (SP is sports) This was happening because SageTV was flagging them as TV files when it saw the special external ID....which caused them to be skipped over when doing the import scan....so the scan was fixed to also check acquisition mode (which is still set to automatic by import path). For the bug where you're creating a duplicate airing....it might be OK. Are you going off the return value of SetMediaFileAiring only? Because if you call AddAiring and it overlaps on time/channel with an Airing already in the DB; any ManualRecords and MediaFile objects that link to it will automatically be updated to reflect this (otherwise Zap2it EPG data changes would cause the links to ManualRecords and MediaFiles to be lost....which was an old bug). So you may be done at the point you call AddAiring. Let me know how it goes. Does that clear up everything on this topic yet? I
__________________
Jeffrey Kardatzke Founder of SageTV |
#9
|
|||||
|
|||||
Quote:
Quote:
Quote:
Quote:
Quote:
Thanks for the info!
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki Last edited by nielm; 05-02-2005 at 03:45 AM. |
#10
|
||||
|
||||
I want to use AddShow to change the parental rating on some episodes that it's not set, but I can't seem to get it to work. I can change the movie rating and other things, but not the parental rating. I've tried using a simple string, data union, and java_util_List_toArray.
ratings = GetAiringRatings(Airing) SetElement(ratings, 0, "TV14") AddShow(GetShowTitle(Airing), IsShowFirstRun(Airing), GetShowEpisode(Airing), GetShowDescription(Airing), GetShowDuration(Airing), GetShowCategory(Airing), GetShowSubCategory(Airing), GetPeopleListInShow(Airing), GetRolesInShow(Airing), GetShowRated(Airing), GetShowExpandedRatings(Airing), GetShowYear(Airing), ratings, GetShowMisc(Airing), GetShowExternalID(Airing), GetShowLanguage(Airing), GetOriginalAiringDate(Airing)) |
#11
|
||||
|
||||
According to the docs, the ParentalRating argument to AddShow is ignored. AddAiringDetailed has the real ParentalRating info.
__________________
-- Greg |
#12
|
||||
|
||||
Thanks, I'm so used to figuring out everything on my own, I forgot that there are docs now. I might get spoiled.
AddAiringDetailed worked like a charm however, I don't see an easy way to get the information to fill in PartNumber, TotalParts, Stereo, ClosedCaptioning, SAP, Subtitled, PremierFinale since it's all lumped into GetExtraAiringDetails. Last edited by malore; 09-01-2006 at 03:14 PM. |
#13
|
||||
|
||||
I posted some code a little while ago for parsing out that stuff from the files produced by Niel's XML generator. Feel free to crib from that if you like.
http://forums.sagetv.com/forums/show...29&postcount=9
__________________
-- Greg |
#14
|
||||
|
||||
Working solution:
Details = GetExtraAiringDetails(Airing) -PartNumber = java_lang_Integer_parseInt(java_lang_String_replaceFirst(Details,".*?Part (\\d+) of (\\d+).*", "$1")) --TotalParts = java_lang_Integer_parseInt(java_lang_String_replaceFirst(Details,".*?Part (\\d+) of (\\d+).*", "$2")) ---AddAiringDetailed(GetShowExternalID(Airing), GetStationID(GetChannel(Airing)), GetAiringStartTime(Airing), GetAiringDuration(Airing), PartNumber, TotalParts, "TV14", IsAiringHDTV(Airing), java_lang_String_matches(Details,".*Stereo.*"),java_lang_String_matches(Details,".*Closed Captioned.*"), java_lang_String_matches(Details,".*SAP.*"),java_lang_String_matches(Details,".*Subtitled.*"), java_lang_String_replaceFirst(Details,".*?(Channel Premiere|Premiere|Season Finale|Season Premiere|Series Finale|Series Premiere).*", "$1")) A lot of code just to change PG to TV14 Last edited by malore; 09-01-2006 at 04:10 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|