|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#21
|
||||
|
||||
Quote:
Code:
SetMediaFileMetadata("MediaTags",GetMediaFileMetadata(";MyTag;"l")) Code:
// check if tags exists Tags = GetMediaFileMetadata("MediaTags") if Tags not null exists = java_lang_String_contains(Tags, ";MyTag;"") endif // remove a tag if Tags not null Tags = java_lang_String_replaceAll(Tags, ";MyTag;","") endif // Adding a Tag if Tags not null exists = java_lang_String_contains(Tags, ";MyTag;"") if !exists SetMediaFileMetadata("MediaTags", Tags + ";MyTag;") endif else SetMediaFileMetadata("MediaTags", ";MyTag;") endif
__________________
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 |
#22
|
||||
|
||||
The DataUnion() api call can be used to easily add new items to the MediaTag list. This automatically handles duplicates and nulls. I also agree with everything else stuckless said.
Code:
Tags = GetMediaFileMetadata("MediaTags") Tags = DataUnion( Tags, ";MyTag;" ) SetMediaFileMetadata("MediaTags", Tags ) Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full." - Nikolaus (4yrs old) Last edited by MeInMaui; 07-07-2009 at 11:25 AM. |
#23
|
||||
|
||||
Wouldn't DataUnion() need to have the data as an Array or Collection? And it returns a Vector. I'm not sure what the result of SetMediaFileMetadata("MediaTags", Vector) would be? Will that work?
__________________
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 |
#24
|
||||
|
||||
Sorry, it's early here. I wasn't thinking. The Get/SetMediafileMetadata() call returns/expects a string, so some conversion would be required.
Aloha, Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full." - Nikolaus (4yrs old) |
#25
|
|||
|
|||
Thanks for the suggestion making an array and then adding it makes sense to me.
|
#26
|
||||
|
||||
I was not trying to suggest any sort of 'windows only' solution, where sage would actively use the windows tags, but more a crossover app that would sync windows and sage tags. While tagging would be a nice feature for video, it is a necessity for photo.
__________________
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 |
#27
|
|||
|
|||
Any thought on adding a "most recently watched time" field to the database? Setting would be set to current time whenever watched flag is set. This would allow (I think) a better method for managing deletion of files. Particularly those that people will watch repeatedly (think kids shows or syndicated sit coms).
|
#28
|
||||
|
||||
I think you can already do that, or at least I remember having a theory about doing that with the "stock" data in the database.
|
#29
|
|||
|
|||
Just for people that want to know I am using MediaTags with everyone suggestion and they work great in my latest build.
|
#30
|
|||
|
|||
Quote:
GetRealWatchedStartTime() GetRealWatchedEndTime() http://download.sage.tv/api/sage/api...sage.Airing%29 That being said I don't know if the deletion manager uses this (i would assume it would though, but you know what they say about assumptions... ).
__________________
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 |
#31
|
|||
|
|||
Quote:
Also don't know if that works for dvds (haven't tested) don't know why it would it doesn't work for formatdescription or watched |
#32
|
|||
|
|||
ya the format description thing really irks me... for dvds there is no good data (relating to the video)... i think you can get the audio info with some GetAudioSoundtracks or something... i just dont get it.
__________________
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 |
#33
|
|||
|
|||
Quote:
.... sorry this will become disjointed thinking out loud from this point... My thought was for a special favorite type - keep at least N episodes The theory to implement was to store the watched time and toggle the watched flag OFF to prevent auto deletion as well as to allow for re-recording in the future. Then we would need a process to identify those to delete based on the Keep at MOST and the watched time. ... think think think ... I guess you could use the Watched flag AND this time to determine the most recently watched for deletion - then make sure the watched flag is unset at the same time you delete the file thus allowing it to be re-recorded in the future. Lets see... Set favorite to record first run and reruns Set favorite to keep until I delete Set keep at most to N+ some number Keep at least N - need to store this some place too - associated with the favorite, not to mention a way to enter the value Process for delete - only need to process when number of episodes >= "keep at most" AND there is an episode to consider for recording. Determine the most recently watched episode of the favorite (that is currently recorded) Compare watched time from the episode in the guide against the most recently watched episode currently recorded. If the guide episode is "older" then delete the recorded file - clear the watched flag on the deleted episode. If the new recording HAS BEEN WATCHED - set the watched flag. This will make it easier to pick the never watched episodes. Any thoughts on how to prevent a recording conflict... don't want a previously watched episode to prevent recording of a first run of a lower ranked favorite - or even an IR What do these two calls return if the episode has not been watched? .... Grrrrr... I really wish Sage would just implement the KEEP AT LEAST setting... Sorry... that went pretty off topic.... Last edited by briands; 07-17-2009 at 02:23 PM. |
#34
|
||||
|
||||
Quote:
GetMediaFileFormatDescription() I suspect this doesn't work with DVD's (and ripped DVD's or Blue Rays) for the same reason that the Watched status doesn't work. It is because DVD's do not need to be a single linear file like most other video formats. They aren't even stored in a single file (usually), but spread out over multiple files. DVD's can store multiple movies on a single disk and break them up into chapters and "titles". They can also contain extra features like movie trailers, menus, and still images - each of which can be encoded in different formats (resolutions, bit rates, audio quality etc.). And, they even support interactive DVD's - there are DVD Games that you can "play" on a regular DVD player, where playback jumps around all over the place based on what buttons you press on the remote. So, Sage can remember exactly where you are in a given DVD (title, chapter, and position within the chapter) and it can tell you the format information of whatever it is playing back at the moment. But, it can't tell you the format of the whole disk because there may be multiple formats used, and just because your current watch position is near the end of a given title, it doesn't know if you've watched all of the titles and chapters. Just consider the case where you rip a movie DVD. If you've watched the main movie all the way through the credits, but you didn't watch the "deleted scenes", should Sage mark the movie as "watched"? What if you watched all of the "Extras", but not the main movie? And, how would Sage know for sure if you were watching the main movie or one of the extras?
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2),USBUIRT (multi-zone) Source: Comcast/Xfinity X1 Cable Primary Client: Server Other Clients: (1) HD200, (1) HD300 Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE, HDHR, HVR-2250, HD-PVR |
#35
|
|||
|
|||
Quote:
Quote:
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 |
#36
|
|||
|
|||
For those interested thanks to Razors help getting started, I have got some of the tagging coding done in my external Jar file. I will try and get it uploaded if other want to use it. I thought maybe this could help stuckless focus on other things on the to do list (cough music fanart cough )
|
#37
|
||||
|
||||
Sounds great! What kind of speed/performance are you seeing with tag based sorting or large collections?
|
#38
|
|||
|
|||
Quote:
The tagging seems to work really well and the coding for my first time in eclipse and such seems to work spot on and I am amazed how easy eclipse is to use to be honest once you figure it out it greatly expands the possibilites |
#39
|
|||
|
|||
Quote:
Currently with his collection I can do extremem filtering on menuload, build categorie groups,build tagging groups, build array of fanart for categories and tagging groups in about 1:30 but I think once I change over to all these new calls I can cut that drastically down hoping to get around 30 seconds max although faster would be ideal. considering I go through the collection about 6 times during load he is the perfect tester |
#40
|
||||
|
||||
I made this a while ago, but just gave it to the Phoenix guys, maybe you'll find it useful too...
Basically, its a self-extracting archive that contains a directory structure with 1000+ organized TV Episodes complete with metadata and fanart. Really its just the same tiny video and pictures renamed and copied 3000+ times, but when you import the directory into Sage it'll think you have a massive imported TV library. Be warned, the file is only 2 mb but it extracts to 1.5 GB so make sure you've got the space. Last edited by evilpenguin; 07-28-2009 at 04:45 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Details about metadata properties files | Opus4 | SageTV Customizations | 37 | 11-06-2011 05:00 PM |
New arbitrary metadata discussion | Ikarius | SageMC Custom Interface | 41 | 04-06-2009 12:51 PM |
.properties, .my, and TV metadata in SageMC | himay | SageMC Custom Interface | 1 | 05-26-2008 09:43 PM |
6.1.4 Metadata Properties Parsing | JREkiwi | SageTV Beta Test Software | 35 | 03-10-2007 08:39 PM |