Possibly convenience methods for Language and multiple audios.
Right now I'm doing:
Code: Select all
{ def _lang = any{ au["Language"] }{ video.first()["Language"] }
  net.filebot.Language.findLanguage(_lang).ISO3.upperInitial() }
Code: Select all
{ def _lang = any{ au["Language"] }{ video.first()["Language"] }
  net.filebot.Language.findLanguage(_lang).ISO3.upperInitial() }
 I've never seen a video stream with Language defined. Is that a thing? Different video streams for different locales?
 I've never seen a video stream with Language defined. Is that a thing? Different video streams for different locales?The link you provided is more than sufficient. That's how we noticed the changes in mediainfo from v17 to v18 so I'd say it's useful to have.rednoah wrote: ↑11 Jul 2019, 09:15 1.
MediaInfo changes quite often, so the MediaInfo fields that various bindings are based on are subject to change. I'll see about better documentation, but it'll focus on purpose and possible values, rather than implementation details. That being said, implementation details are and remain available in the public API documentation.
{audioLanguages} does do Languages but not different audio formats. Most of my movies are BD rips, which means there are commentary tracks with lower audio quality, hence the "convenience". Kim already has a way to extract all audio streams and various info, it's doable.rednoah wrote: ↑11 Jul 2019, 09:15 2.
{audioLanguages} is available in recent releases, though it's based on MediaInfo audio stream languages only. Language is on my list of public API classes already, since Language objects are returned by various format bindings.
There are files for which a mediainfo language field is set for video but not for audio, for some reason. No idea why they do it, but it comes from the encoders most likely.
Code: Select all
filebot -script fn:mediainfo . https://github.com/filebot/scripts/blob ... nfo.groovy
 https://github.com/filebot/scripts/blob ... nfo.groovy Same as doing find . -type f -exec mediainfo {} + but works on Windows too.
 Same as doing find . -type f -exec mediainfo {} + but works on Windows too.Code: Select all
TheTVDB.requestJson()
TheTVDB.resolveImage()Code: Select all
TheMovieDB.properties.configuration.images.secure_base_url
TheMovieDB.request()
TheMovieDB.resolveImage() I'd rather implement code for all the requirements you (or others) might have, and then make it available via Movie class extension methods, so you don't need to do the plumbing yourself.
 I'd rather implement code for all the requirements you (or others) might have, and then make it available via Movie class extension methods, so you don't need to do the plumbing yourself. Since the methods aren't even public in the internal API, they won't show up in the docs, so just click on any public method to see the source, and then scroll to what you are interested in. Naturally, this is a bad solution. Best to write proper public API.
 Since the methods aren't even public in the internal API, they won't show up in the docs, so just click on any public method to see the source, and then scroll to what you are interested in. Naturally, this is a bad solution. Best to write proper public API.Well, TheTVDB / TheMovieDB API is not infinite, and FileBot will implement as much as necessary. It makes sense to implement more of it, so that I can expose it as stable public API to you via scripting.kim wrote: ↑05 Aug 2019, 18:24 The problem with this is you have all the power, e.g. you will not support episode in amc/htpc viewtopic.php?f=6&t=3660#p20471
Code: Select all
filebot -list --q Firefly --format "{episode} => {episode.info.director} | {episode.info.writer} | {episode.info.overview}"Code: Select all
net.filebot.web.OpenSubtitlesHasher.* ( computeHash() )
net.filebot.Cache.getCache()
MediaInfo.snapshot() There is File.getMediaCharacteristics() but that's either a MediaInfo object or a FFProbe object. (I've added implementing classes for MediaInfo and FFProbe to the docs, though I wouldn't strictly call them public API. I've just added them for your convenience. Use at your own risk.)
 There is File.getMediaCharacteristics() but that's either a MediaInfo object or a FFProbe object. (I've added implementing classes for MediaInfo and FFProbe to the docs, though I wouldn't strictly call them public API. I've just added them for your convenience. Use at your own risk.) MediaInfo.snapshot() is meant for debugging if you don't know what raw MediaInfo properties there are. It is likely best to use getMediaInfo(file, "{vf}") if you need something specific so that you can use the usual format bindings (which typically try various MediaInfo fields to make it work regardless of underlying libmediainfo version).
 MediaInfo.snapshot() is meant for debugging if you don't know what raw MediaInfo properties there are. It is likely best to use getMediaInfo(file, "{vf}") if you need something specific so that you can use the usual format bindings (which typically try various MediaInfo fields to make it work regardless of underlying libmediainfo version). IDK what you use Cache for. Depending on how you use it, a public Cache interface might make sense, or more API interfaces so you don't need to worry about the Cache yourself.
 IDK what you use Cache for. Depending on how you use it, a public Cache interface might make sense, or more API interfaces so you don't need to worry about the Cache yourself. OpenSubtitlesHasher, AFAIK, it's only useful for OpenSubtitles search requests, and FileBot already implements those. I'd be curious what you use it for, so I can think about a good way of exposing it (or void the need to access it directly in the first place).
 OpenSubtitlesHasher, AFAIK, it's only useful for OpenSubtitles search requests, and FileBot already implements those. I'd be curious what you use it for, so I can think about a good way of exposing it (or void the need to access it directly in the first place).Code: Select all
{episode}Code: Select all
MediaInfo.snapshot()Code: Select all
getMediaInfo(file, "{vf}")Code: Select all
net.filebot.Cache.getCache('IMDbData_JSON', net.filebot.CacheType.Weekly).computeIfAbsent(IMDbId) {}Code: Select all
computeHash(inputFile)Code: Select all
def f = '/path/to/file' as File
// Get Format property of Video Stream #0
println f.mediaInfo.Video[0].Format
// Iterate audio streams
f.mediaInfo.Audio.each{ 
	println it.StreamKindID
	println it.Format
}Code: Select all
f.hash 'moviehash'  // OpenSubtitles Movie Hash
f.hash 'crc32'
f.hash 'md5'
f.hash 'sha256'
Code: Select all
{episode.seriesInfo.artwork}Code: Select all
{episode.seriesInfo.raw}Code: Select all
{episode.info.raw}