INTERACT FORUM
More => Old Versions => Media Center 17 => Topic started by: gvanbrunt on April 13, 2012, 08:36:01 am
-
I would like to put together a list of 20 scripting tasks. For example "Add a song to playlist". After having collected the list, I would like to update the Wiki documentation to include examples of doing it various languages. I think many could benefit from that knowledge.
So the question is, what are you using scripting for currently? Also, what would you like to be able to automate? These can be using any of the available methods/API's.
-
In this thread http://yabb.jriver.com/interact/index.php?topic=67579.msg453588#msg453588 (http://yabb.jriver.com/interact/index.php?topic=67579.msg453588#msg453588) JustinChase has very graciously shared his method of marking TV recordings with edl files so that Comskip can work in MC and WMC. He has just written a simpler procedure that just works in MC. He uses the external program MC-TVConverter 2.1.0 to do the required tasks. I'm wondering if this could also be accomplished with Scripting and if it might even be easier yet to implement?
Thanks,
Rod
-
This may not be exactly what you're looking for, sorry if so.
I don't currently do any scripting (don't know how), but I would like a script to use the Series name and Episode name to look up the Season and Episode Numbers. Neither JRiver nor WMC includes season or episode number in the metadata, but does include Series and Episode Names and Original Air Date. I don't know of any way currently to auto-populate the Season and Episode Numbers, and am very tired of doing it manually.
-
As far as I know, MC doesn’t support scripting. You can’t do something like
A=[Song]
B=[Composer]
C=A || B
You can only use expressions.
Unfortunately you can have only 1 compound expression.
This makes them hard to build and to debug like
If(IsEmpty(ListItem(FixCase([Album],4),1,d.)),
If(IsEmpty(ListItem(FixCase([Album],4),1,bwv)),
If(IsEmpty(ListItem(FixCase([Album],4),1,op.)),
If(IsEmpty(ListItem(FixCase([Album],4),1,woo)),
If(IsEmpty(ListItem(FixCase([Album],4),1,kv)),
,
KV ListItem(FixCase([Album],4),1,kv)
),
WoO ListItem(FixCase([Album],4),1,woo)
),
Op. ListItem(ListItem(Replace(Replace(FixCase([Album],4),/(,;),-,;),1,op.),0)
),
BWV ListItem(FixCase([Album],4),1,bwv)
),
D. ListItem(ListItem(Replace(Replace(FixCase([Album],4),/(,;),/,,;),1,d.),0)
)
You can’t have multiple lines like
(http://thewelltemperedcomputer.com/SW/WMP/screenshot/Opus2.jpg)
Asking for a scripting language is probably a bit too much.
But multiple independent expressions MP3Tag style would be a great asset.
Makes using them much easier.
I use scripts to clean up my tags as shown in the examples below
http://thewelltemperedcomputer.com/SW/Players/MC14/MC_Expression_opus.htm
http://thewelltemperedcomputer.com/SW/Players/MC14/MC_Tagging.htm
-
Vincent, I agree.
But until then, you're working too hard. Try something like this:
Regex([Album], /#(Op\.|BWV) ?([^(]+)#/, -1)/
if(isequal([R1], op., 1), FixCase([R1],2),[R1]) [R2]
I only tested w/the samples shown in the screenie. Provide me with some more, and I'll work those in too.
-
As far as I know, MC doesn’t support scripting......
Asking for a scripting language is probably a bit too much......
My take on the original post was that he was not expecting that the scripts had to be done within MC. Or did I misunderstand?
Rod
-
Regex([Album], /#(Op\.|BWV) ?([^(]+)#/, -1)/
if(isequal([R1], op., 1), FixCase([R1],2),[R1]) [R2]
MrC
I see some very beautiful music in the screen.png
And some horrible syntax
Fortunately at the time I wrote that expression there was no regex in MC.
Today there is but I’m afraid I will never grasp it.
But I know, if I need some help you will come to my rescue
Thanks.
-
It's like your lips are moving, but you're not saying anything:
And some horrible syntax
because my eyes read...
....
),
Op. ListItem(ListItem(Replace(Replace(FixCase([Album],4),/(,;),-,;),1,op.),0)
),
BWV ListItem(FixCase([Album],4),1,bwv)
),
D. ListItem(ListItem(Replace(Replace(FixCase([Album],4),/(,;),/,,;),1,d.),0)
;D
-
My take on the original post was that he was not expecting that the scripts had to be done within MC. Or did I misunderstand?
You are correct. MC supports a few different methods of automating. These are are done "outside of MC". But they can control, update the database, etc. They are also commonly used in Theater View to get functionality not normally possible there. In that case they are usually one line MCC commands. Even so, they are technically scripting.
As for scripting "inside" MC, that is also possible with some plug ins...
What I'm looking for is anyone that is using scripting or MCC commands to automate MC already so I can come up with a list of common tasks that people do. Or even some "stupid MC tricks" would be good. Many Theater View "hacks" would fit under that category.
I would like a script to use the Series name and Episode name to look up the Season and Episode Numbers
I thought it did do this, but I could be wrong. If not that would be an excellent idea for polishing which JRiver is currently focusing on in MC17. You might want to start a new thread about that...