[Logo] Jaikoz and SongKong Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Renaming like iTues  XML
Forum Index -> SongKong Questions
Author Message
toshni


[Avatar]

Joined: 12/08/2017 01:48:52
Messages: 6
Offline

What is the correct rename mask to create a directory structure like in "iTunes" directory system.
e.g .:
"Various Artists" to "Compilations"
"3-13 Do not Let Me Be Misunderstood.mp3" means Disk 3, Title 3, etc.

I do not want to, just to achieve this, import everything into iTunes. I'm an Ubuntu user.

It would be great, if somebody could help me.
hardbass_junkie

Pro

Joined: 15/08/2015 10:22:36
Messages: 22
Offline

Well, you're question is not really clear to me. Especially because you "do not want to, just achieve this"
My best advice to an ubuntu user, would be to ditch itunes, and get another media player. But because you probably need it to sync it with a mobile device, this might not be an option, because of compatibility issues (even though some idevices are supported).

Could you try to explain more clearly what your current situation is, and what you want to achieve?
toshni


[Avatar]

Joined: 12/08/2017 01:48:52
Messages: 6
Offline

Sorry for the confusion.

My question is: How do I change the rename mask so that the result creates the same or similar directories and filenames as "iTunes" does.
Especially for the "compilations" and (if available) the CD number of a multi-disc album.

I currently use iTunes only for file naming and not as a player because I really like the iTunes directory structure.
hardbass_junkie

Pro

Joined: 15/08/2015 10:22:36
Messages: 22
Offline

So if I understand correctly, you want something like:

~/album title/discnumber/artist - title.ext or something?

I'm sorry, i'm not really familiar with the itunes naming scheme.
toshni


[Avatar]

Joined: 12/08/2017 01:48:52
Messages: 6
Offline

The iTunes renaming scheme is like that:

[Artist]/[Album]/[CD-No.-][Track No] - [Title].[Ext]
or
Compilations/[Album]/[CD-No.-][Track No] - [Artist] - [Title].[Ext]

But I don't know, how to create that in SongKong.


hardbass_junkie

Pro

Joined: 15/08/2015 10:22:36
Messages: 22
Offline

Give this a shot:

Code:
function pad(number, length) {
       if (number == '') { return '';} 
       var str = '' + number; 
       while (str.length < length) {  
           str = '0' + str;
       }
       return str;
   }
  
  function ifnotempty(value,sep){
      return value.length > 0 ? value + sep : '';
  }
  
  function ifnotempty2(value1,value2,sep){
      return value1.length > 0 ? value1 + sep :value2.length > 0 ? value2 + sep:'' ;
  }
  
 'Compilations/' + ifnotempty(album,folderseparator) + ifnotempty(disctotal,' - ') + ifnotempty(pad(trackno,2),' - ') + ifnotempty2(albumartist,artist,' - ') + title
 


It should return ~/Compilations/Album/Diskno - Trackno - Artist - Title.ext

It's actually for jaikoz, but it might work:
a few remarks:
- I haven't tried it myself, so if you try it, please do so with a couple of copied files, so it doesn't corrupt your whole database, if I made a mistake.
- This will put ALL albums in a Compilations subfolder, since I didn't figure out how to make it work with a compilations flag.

If someone has any corrections, or suggestions: please, don't be shy.
hardbass_junkie

Pro

Joined: 15/08/2015 10:22:36
Messages: 22
Offline

Have you allready tried it? Any feedback would be nice.
toshni


[Avatar]

Joined: 12/08/2017 01:48:52
Messages: 6
Offline

Thanks for your help.
In the directory "Compilations" only the files should be moved with the tag "COMPILATION" = 1 and / or "ARTIST" = "various artists".
 
Forum Index -> SongKong Questions
Go to:   
Powered by JForum 2.1.6 © JForum Team