[Logo] Jaikoz and SongKong Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Unable to use this renaming mask.  XML
Forum Index -> Jaikoz Issues
Author Message
greengeek

Pro
[Avatar]

Joined: 18/09/2007 02:50:48
Messages: 435
Offline

I have different renaming masks in both songkong and jaikoz. I had to create a new one for songkong because my jaikoz one wouldn't work. I ended up liking the new songkong one I made better, but I also can't use it in jaikoz. Does songkong and jaikoz use different javascript interpreters or different naming conventions? Are the 2 programs naming masks not compatible with each other?

This is my songkong one:

Code:
   ifnotempty(albumartist,'/')
 + ifnotempty(album,' ')
 + (year.length>0  ? '(' + year + ') ' : '')
 +  (mbreleasecountry.length>0  ? '(' + mbreleasecountry + ') ' : '')
 +'/'
 + (disctotal>1 ? discno + '-' : '')
 + track + ' - '
 + title
 


I tried just breaking it into 2 parts to use it in jaikoz and it is not showing it working in the example mask.

Folder shows empty if I try:

Code:
   ifnotempty(albumartist,'/')
 + ifnotempty(album,' ')
 + (year.length>0  ? '(' + year + ') ' : '')
 +  (mbreleasecountry.length>0  ? '(' + mbreleasecountry + ') ' : '')
 


File shows empty if I try:

Code:
 (disctotal>1 ? discno + '-' : '')
 + track + ' - '
 + title
 


Any ideas why I can't use my songkong file mask in jaikoz?

KevinBluemel.com
Contemporary Instrumental Musician and Composer. Stop by to listen, watch videos, and get free downloads of songs and sheet music.
[WWW]
paultaylor

Pro
[Avatar]

Joined: 21/08/2006 09:21:27
Messages: 6940
Online

Hi its because the track number variable in SongKong is track but in Jaikoz it is trackno , I think this is really a mistake in songkong as I use discno for Disc Number in both. A little akward to change now but I'll raise an issue for this.

Secondly in the Subfolder mask you need to define the ifempty function, its already defined in SongKong.

Simply modifying track to trackno and adding ifempty will work, Ive tested out your masks in Jaikoz.

thanks Paul (Administrator)
greengeek

Pro
[Avatar]

Joined: 18/09/2007 02:50:48
Messages: 435
Offline

or if trackno is not used in sk, you could define it, and list it in the help, but not pull out track in the code itself, so it doesn't break any existing masks. Allow both variables to be used?

What would i need to define ifnotempty to? Would it need a function created first or something?


KevinBluemel.com
Contemporary Instrumental Musician and Composer. Stop by to listen, watch videos, and get free downloads of songs and sheet music.
[WWW]
paultaylor

Pro
[Avatar]

Joined: 21/08/2006 09:21:27
Messages: 6940
Online

Yes I might do that.

ifempty is defined earlier in the javascript in the default Jaikoz rename mask, I created this blog post based on your question which should make things clearer

http://blog.jthink.net/2014/04/sharing-filename-masks-between-songkong.html


thanks Paul (Administrator)
greengeek

Pro
[Avatar]

Joined: 18/09/2007 02:50:48
Messages: 435
Offline

Awesome! Thank you for the write up! I will give it a try.

KevinBluemel.com
Contemporary Instrumental Musician and Composer. Stop by to listen, watch videos, and get free downloads of songs and sheet music.
[WWW]
greengeek

Pro
[Avatar]

Joined: 18/09/2007 02:50:48
Messages: 435
Offline

Just an update on the blog post. I found you need to use the folderseparator variable in jaikoz instead of the slash for it to work. So it would look like this:

Code:
 function ifnotempty(value,sep){
      return value.length > 0 ? value + sep : '';
  }
 
     
  ifnotempty(albumartist,folderseparator)
  + ifnotempty(album,' ')
  + (year.length>0  ? '(' + year + ') ' : '')
  +  (mbreleasecountry.length>0  ? '(' + mbreleasecountry + ') ' : '')
 

KevinBluemel.com
Contemporary Instrumental Musician and Composer. Stop by to listen, watch videos, and get free downloads of songs and sheet music.
[WWW]
paultaylor

Pro
[Avatar]

Joined: 21/08/2006 09:21:27
Messages: 6940
Online

Ah, okay thanks perhaps '/' only works on OSX

thanks Paul (Administrator)
 
Forum Index -> Jaikoz Issues
Go to:   
Powered by JForum 2.1.6 © JForum Team