|
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
|
|||
|
|||
SetMediaFileMetadata?
I am trying to add a couple custom metadata properties in my app. I am using SetMediaFileMetaData here is an example
Name: "SMWMediaType" Value: "Blu-Ray" It seems to set the property right in the .properties file but it also sets about 5 or 6 null = null and I wasn't sure where that was coming from? TIA |
#2
|
||||
|
||||
My guess is that sometimes you are calling SetMediaFileMetaData with a null key and value.
Just curious, but wouldn't sage's IsBluRay() api call return wheter or not the media is a BluRay?
__________________
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
|
|||
|
|||
Not when your Blu rays rips aren't in native format
I am just tesing with the exact values above it gets In the properties file but still puts the null in also if you change the value it adds another property instead of changing the existing |
#4
|
||||
|
||||
The property changes are appended to the .properties file, but when they are read back by sage, then only the last appended entry is retained.
__________________
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
|
|||
|
|||
Okay that makes sense. I will check it out and see if the null's dissapear as well still don't know what is putting them there.
|
#6
|
|||
|
|||
just as a side note do people think it is wise to start "cluttering" up the metadata with "random" extra metadata fields? I know plucky has a legitimate reason for wanting to add a "bluray" tag for movies that are not in a blurary container...but the same thing could be accomplished by requiring users to include bluray or BD in the title of the mkv (or whatever container). Likewise the same thing could be required for DVDs that arent in a dvd folder container. Personally i think the metadata should be just that... metadata.... and even the extra metadata fields should have some uniformity to them.
To make calling this simpler in sage someone could even write a jar (or include this in one of the ones that is written already (ie sagemc)) that check for these in the filename and return a true/false boolean.
__________________
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 |
#7
|
|||
|
|||
I don't really see it as "cluttering" it up I see the properties fields as just that properties for the media file that can be used by sage as long as the additional properties relate accordingly.. I think adding it to the title could create problems when do metadata lookups
|
#8
|
|||
|
|||
ya i can see that... then i propose we create a "standard" metadata field like MediaType (or something similar if that one is already taken) and then have it equal a standard set of values... BluRay, DVD, or TV for example and then everyone can use the standard set.... thoughts?
__________________
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 |
#9
|
||||
|
||||
I agree with razrsharpe. That's why a group of us collaborated on the new metadata fields that were used by central fanart. If not, then I would have used BMTMediaType, BMTMediaTitle, etc and EP would have used, MSMediaType, etc, etc. I would propose that if you are going to add a new metadata field, then you start a discussion and get collaboration and input on the field, field name, possible uses, etc.
If you go with SMWMediaType, then no other tool/plugin is going to adopt it, because it the field "belongs" to SMW". Collaborating with others on the introduction of new metadata fields will ensure that your metadata field choices get adopted by others, and will reduce the "clutter". For example, if you introduce, SMWMediaType, will your plugin remove SMWMediaType from the mediafile metadata when the plugin is removed? If not, then when SMW is removed, then your plugin's metadata is now "clutter" (like adding stuff to windows registry, and never cleaning it out). But if it's a general purpose metadata field, then other plugins will probably use it as well. Currently, in BMT, i need to know the content type of a media file, so I internally use a "ContentType" metadata field, although I never write it out. I only use it to determine if the current media file is a DVD or not. So i can see the value in adding a metadata field for SubMediaType or ContentType.
__________________
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 |
#10
|
|||
|
|||
Okay so where would this discussion best be started? Customizations?
|
#11
|
||||
|
||||
Yeah... I would think that somewhere under customizations.... i think the original metadata fields for fanart was started under sagemc, but that's probably the wrong place 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 |
#12
|
|||
|
|||
Is that a new method with the next release? I see it says Since: 6.6 in the javadocs. I found it was better to use a seperate xml file to store the data so it doesn't muk up the wiz.bin.. Of course you must be willing to have the code in place to maintain it...
Thanks, Jeff |
#13
|
||||
|
||||
The advantage of using the .properties is that Sage will load it automatically... even the custom metadata fields.
__________________
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 |
#14
|
|||
|
|||
Is there a way to delete the metadata? I only see a Get and Set...
Thanks, Jeff |
#15
|
||||
|
||||
You could try to set null (or empty string) into the value and see what happens. It may not remove the field entry, but it would probably set it to null (my guess).
__________________
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
|
|||
|
|||
Yes it sets it to null doesn't remove it though
|
#17
|
|||
|
|||
Quote:
Using MediaTag and addings new tages with ;newtag; seperators. Also have the option of setting the tag to null. It appends and reads the tags okay from within sage but in the actual properties file it is keeping a running total like below MediaTags=;Jamie; MediaTags=;Jamie;;PLUCKYHD; MediaTags=null MediaTags=;PLUCKYHD; MediaTags=null MediaTags=;PLUCKYHD; MediaTags= MediaTags=;skye; MediaTags=;skye;;jamietest; MediaTags= MediaTags= anyone know hot to avoid this sure makes the properties file look cluttered. |
#18
|
||||
|
||||
Basically, Sage simply opens and appends to the .properties file as you call SetMediaFileMetadata(). It does this since, it is a lot more efficient (in their case) to append the values and then to read, update, and write the values each time SetMediaFileMetadata is called.
You can turn off the writes to the .properties if it bothers you. (I don't know the option off hand, but Narflex documented it in the release notes) In the case of the properties that you have listed above, when the .properties file is re-read, MediaFile will be blank, since the last thing written to it was an empty string. Are you seeing something different in your testing?
__________________
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 |
#19
|
|||
|
|||
Quote:
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|