Welcome Guest

Pages: 1
Modification of path in playlist
chrisg81PostOctober 2, 2016, 05:14
Newbie
Posts: 13
Registered:
August 22, 2016, 19:49
Normal topicModification of path in playlist

Hi Yate Support,

i have a question regarding playlists. All my music files are located on a (Synology NAS). Now I wanted to create playlists which I can use with the "Audio Station" (package of Synology) and Sonos. I created the playlists with the "create M3U File" action. For Sonos this works fine, but Audio Station expects a different file path.

E.g.:
File path from Yate action:
/Volumes/music/Genre/Artist/Title

File path expected from Audio Station:
../Genre/Artist/Title

So the part /Volumes/music is replaced by ../

Is it possible to export a playlist this way from Yate?

Thank you for your support!

2MR2PostOctober 2, 2016, 07:52
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: Modification of path in playlist

As all my tracks are on a NAS drive, I have this one covered. 🙂

Yate can produce relative contents in m3u files but as the contents are relative to the produced file, it may not solve your problem.

The 'Create m3u files' action statement has far more functionality than the UI. With the statement you can provide relocation information. If you want to be prompted for the playlist name you can do the following:

Prompt for New file with "Choose a location for the playlist". Save path to named variable 'Playlist Path' file types 'm3u'
Set named variable 'Playlist Name' to "\<Playlist Path>"
Find "." from the end in named variable 'Playlist Name', remove it and everything after
Find "/" from the end in named variable 'Playlist Name', remove it and everything before
Find "/" from the end in named variable 'Playlist Path', remove it and everything after
Create m3u files using custom settings

The settings for the 'Create m3u files' statement are in the attached image.:

I've uploaded the action and you can get it at:

https://2manyrobots.com/actions/chrisg81RelocatePlaylists.zip
Image

chrisg81PostOctober 2, 2016, 08:43
Newbie
Posts: 13
Registered:
August 22, 2016, 19:49
Normal topicRe: Modification of path in playlist

As always, great and quick support 🙂
It works great, thank you!

Just another question: I'm not able to filter in the database by rating (let's say greater 3 Stars).
Example:
1. Open Track Database
2. Open advanced filter dialogue
3. Now I selected #Rating is greater than --> I tried several values but with no success

For information: I use the iTunes rating mapping.

2MR2PostOctober 2, 2016, 14:05
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: Modification of path in playlist

Glad it works as expected.

As far as filtering in the database goes, there are a number of issues. I'm using Apples's predicate control which provides all the UI but gives little if any access to operators. When the control asks me for a value, I have no idea if it is going to use it as a string or integer. The control determines the integer value if necessary from the returned string. That's why I implemented the # columns ... something I personally find unaesthetic ... which fools the control into thinking its a different column . On a # column, I return the integer value of the string representation. This works for track, disk, year, etc. but does not work for rating which will always return 0.

I may be able to provide a dirty trick for the # rows, such that if they only consist of 'stars' or asterisks (for non UTF8 databases), I'll return the length. It seems to me that it should work. I'll try it out.

2MR2PostOctober 2, 2016, 14:51
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: Modification of path in playlist

The dirty trick seems to work fine 🙂

You will be able to use #Rating and the result will be as expected. Normally you would only use the # columns on columns which are or begin with integer data. With that single assumption, whenever a request is made for a # column, I check to see if it has a length >= 1 and <= 5 and is empty or only contains star or * characters. If the condition is met, I substitute the length of the string. If the length is zero, the usual # handling will return 0.

The code will be in v3.14.2 which is the next release.

chrisg81PostOctober 6, 2016, 01:28
Newbie
Posts: 13
Registered:
August 22, 2016, 19:49
Normal topicRe: Modification of path in playlist

Great to hear!
Thank you

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.016 seconds.