Replace output of audios.language...

Any questions? Need some help?
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Replace output of audios.language...

Post by rednoah »

So Kodi will ignore the <writer> element?

Do you have an example for a Kodi/Plex generated NFO xml file, so that I can produce the same output?
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Replace output of audios.language...

Post by kim »

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<movie>
    <title>Star Trek II: The Wrath of Khan</title>
    <originaltitle>Star Trek II: The Wrath of Khan</originaltitle>
    <sorttitle>Star Trek: The Original Series Collection::Star Trek II: The Wrath of Khan::1982-06-03</sorttitle>
    <rating>7.000000</rating>
    <userrating>0</userrating>
    <epbookmark>0.000000</epbookmark>
    <year>1982</year>
    <top250>0</top250>
    <votes>315</votes>
    <outline></outline>
    <plot>Admiral James T. Kirk is feeling old; the prospect of accompanying his old ship the Enterprise on a two week cadet cruise is not making him feel any younger. But the training cruise becomes a a life or death struggle when Khan escapes from years of exile and captures the power of creation itself.</plot>
    <tagline>At the end of the universe lies the beginning of vengeance.</tagline>
    <runtime>113</runtime>
    <mpaa>PG</mpaa>
    <playcount>0</playcount>
    <lastplayed>2016-04-09</lastplayed>
    <id>tt0084726</id>
    <genre>Science Fiction</genre>
    <genre>Action</genre>
    <genre>Adventure</genre>
    <genre>Drama</genre>
    <genre>Thriller</genre>
    <country>US</country>
    <set>
        <name>Star Trek: The Original Series Collection</name>
    </set>
    <credits>Jack B. Sowards (Screenplay)</credits>
    <credits>Nicholas Meyer (Screenplay)</credits>
    <director>Nicholas Meyer</director>
    <premiered></premiered>
    <status></status>
    <code></code>
    <aired></aired>
    <studio>Paramount Pictures</studio>
    <trailer>plugin://plugin.video.youtube/?action=play_video&videoid=vOIYaRb6XpQ</trailer>
    <fileinfo>
        <streamdetails>
            <video>
                <codec>avc1</codec>
                <aspect>2.400000</aspect>
                <width>1920</width>
                <height>800</height>
                <durationinseconds>6781</durationinseconds>
                <stereomode></stereomode>
            </video>
            <audio>
                <codec>aac</codec>
                <language>eng</language>
                <channels>2</channels>
            </audio>
            <audio>
                <codec>aac</codec>
                <language>eng</language>
                <channels>6</channels>
            </audio>
        </streamdetails>
    </fileinfo>
    <actor>
        <name>William Shatner</name>
        <role>Admiral James T. Kirk</role>
        <order>0</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>Leonard Nimoy</name>
        <role>Captain Spock</role>
        <order>1</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>DeForest Kelley</name>
        <role>Dr. Leonard McCoy</role>
        <order>2</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>James Doohan</name>
        <role>Montgomery Scott</role>
        <order>3</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>George Takei</name>
        <role>Cmdr. Hikaru Sulu</role>
        <order>4</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>Nichelle Nichols</name>
        <role>Cmdr. Uhura</role>
        <order>5</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>Walter Koenig</name>
        <role>Cmdr. Pavel Chekov</role>
        <order>6</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>Ricardo Montalban</name>
        <role>Khan Noonien Singh</role>
        <order>7</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>Bibi Besch</name>
        <role>Dr. Carol Marcus</role>
        <order>8</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>Merritt Butrick</name>
        <role>Dr. David Marcus</role>
        <order>9</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>Kirstie Alley</name>
        <role>Lt. Saavik</role>
        <order>10</order>
        <thumb></thumb>
    </actor>
    <actor>
        <name>Paul Winfield</name>
        <role>Captain Clark Terrell</role>
        <order>11</order>
        <thumb></thumb>
    </actor>
    <resume>
        <position>0.000000</position>
        <total>0.000000</total>
    </resume>
    <dateadded>2016-04-09 21:09:38</dateadded>
</movie>
"So Kodi will ignore the <writer> element?"
not tested, but it only export/use "<credits>" instead of "<writer>"
viewtopic.php?f=8&t=3365&p=20115#p20262
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Replace output of audios.language...

Post by rednoah »

<credits> it is. Fixed.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Replace output of audios.language...

Post by kim »

Because of new log I see:
e.g.
{"credit_id":"53c400300e0a26158500cc0b","department":"Writing","id":64785,"job":"Writer","name":"Mark L. Smith","profile_path":null},
{"credit_id":"5342caedc3a36814f9003b47","department":"Writing","id":86500,"job":"Screenplay","name":"Nicolás López","profile_path":null}
Can't you just make it so instead of
} else if (p.writer) {
credits(p.name)
} else if (p.job ==~ /Author|Novel|Characters|Adaptation|Storyboard|Screenplay|Story|Book/) {
credits("$p.name ($p.job)")
}

then use
if department = Writing
if job = Writer {credits("$p.name")}
else if (NOT = "Writer" but e.g. "Screenplay" ) credits("$p.name ($p.job)")}

this will make it so that there is no need to update with more or diff. Writing sub types
(p.job ==~ /Author|Novel|Characters|Adaptation|Storyboard|Screenplay|Story|Book/)
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Replace output of audios.language...

Post by rednoah »

I see. That's new. Added support for that with r3932.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Replace output of audios.language...

Post by kim »

cool

but it looks like it broke "Actors" ? :(
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Replace output of audios.language...

Post by kim »

FileBot 4.6.2 (r3932) / Java(TM) SE Runtime Environment 1.8.0_77

Can you/anyone confirm "Actor" is broken aka missing in the movie.NFO ?
<actor>
<name>Some dude</name>
<role>characters name</role>
</actor>
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Replace output of audios.language...

Post by rednoah »

Yep. Broken. Will be fixed with the next revision.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Replace output of audios.language...

Post by kim »

ok, you never know if something wrong on my end

"fixed with the next revision"

meaning:
you fixed it and I need to do something ?
or you will fix it when you have time ?
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Replace output of audios.language...

Post by rednoah »

You can see what's going on here:
https://sourceforge.net/p/filebot/code/commit_browser

This issue has been fixed with r3933.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Replace output of audios.language...

Post by kim »

htpc update:

1.
I added: channels((s.'Channel(s)')*.split(' / ')*.max().max() because of
e.g. "8 / 7 / 6" in one audio stream... now only 8 ?

Code: Select all

									if (s.'Channel(s)' != null) {
										if (s.'Channel(s)_Original' != null){
											channels((s.'Channel(s)_Original').trim())
										}
										else {channels((s.'Channel(s)')*.split(' / ')*.max().max().trim())}
									}
2.
need a fix for the "Unknown", not sure how (I only know/use replace) ?
BitRate Unknown / 1509000 / 1509000
BitRate/String Unknown / 1 509 Kbps / 1 509 Kbps
Channel(s) 8 / 7 / 6
Channel(s)/String 8 channels / 7 channels / 6 channels
ChannelPositions/String2 3/2/2.1 / 3/2/1.1 / 3/2/0.1

BitRate_Mode VBR / CBR / CBR
BitRate_Mode/String Variable / Constant / Constant
EDIT:

Code: Select all

bitrate((s.'BitRate/String').replaceAll(/\s|Unknown \/|\/ Unknown|[A-Z]\w+/, '').split('/')*.toBigDecimal().max())
Post Reply