Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Media Library Viewer & (embedded) cuesheets (Read 5116 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Media Library Viewer & (embedded) cuesheets

Hello,

I've done some searching, but I couldn't find what I was looking for, so here we go...
I'm using the standard Media Library Viewer and I realized I can't browse for single tracks within a WavPack-file with embedded cuesheet (nor with a seperate cuesheet-file). Haven't tested it, but I guess the same goes for FLAC-files with embedded cuesheet. Each time I'm trying to find a single track within my lossless album backups I have to open the entire album first and throw away all songs from the playlist but the one I was searching for.
I was wondering if it's possible to browse within (embedded) cuesheets with the Media Library Viewer, just like browsing within (sub)directories. I've done some searching on 3rd party components, but I don't think any of them support this.

Media Library Viewer & (embedded) cuesheets

Reply #1
I think somewhere on the forum was someone who titleformatted an Album List view pattern to do this.
elevatorladylevitateme

Media Library Viewer & (embedded) cuesheets

Reply #2
Do you remember where? I've searched the hydrogenaudio forums with multiple keywords, but haven't found anything.

Media Library Viewer & (embedded) cuesheets

Reply #3
Well, you could try:
Code: [Select]
$replace($directory_path(%path%),'\','|')|%filename_ext%$if(%subsong%,|%subsong% - %title%)


Note: I haven't tested this.
elevatorladylevitateme

Media Library Viewer & (embedded) cuesheets

Reply #4
Thanks a lot shakey_snake, it seems to work just fine. I can now add specific tracks within a multitrack file to the playlist no problem.
Since I have my album list always sorted by folder structure, I've changed the code somewhat so looks the same:
Code: [Select]
$replace($directory_path($substr(%path%,12,999)),'\','|')|%filename_ext%$if(%subsong%,|%tracknumber% - %title%)
$substr(%path%,12,999) --> so it skips "D:\Audible\" in my case and starts indexing there.
%tracknumber% instead of %subsong% --> "01 - song title" looks better than "1 - song title" imo.

I have 2 questions though:
- On the wiki page about $directory_path(x) is says "Extracts directory path from the file path x.". Then what exactly are the '\' and '|' for?
- The downside of this code: All singletrack files are now listed too; example:

Artist - 01 - Title.mp3
  |--- 01 - Title

I think I need something like "if length/amount of %subsong% is greater than 1, then list, else don't list". Too bad I'm not that good with code like this, so do you think you can help me with this?

Media Library Viewer & (embedded) cuesheets

Reply #5
Does anyone know how to form a command for this "if then"-problem?

Media Library Viewer & (embedded) cuesheets

Reply #6
Try this [untested and may not work]:

NOTE: Replace x with whatever %subsong% yields for a single track.

Quote
$replace($directory_path($substr(%path%,12,999)),'\','|')|%filename_ext%$if(%subsong%,$ifgreater(%subsong%,x,|%tracknumber% - %title%,))

C.

ps. The '\','|' bit is replacing a '\' with a '|'.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

Media Library Viewer & (embedded) cuesheets

Reply #7
Thanks a lot carpman!
The following codes seem to work fine:
Code: [Select]
$replace($directory_path($substr(%path%,12,999)),'\','|')|%filename_ext%$if(%subsong%,$ifgreater(%subsong%,0,|%tracknumber% - %title%))
$replace($directory_path($substr(%path%,12,999)),'\','|')|%filename_ext%$if($greater(%subsong%,0),|%tracknumber% - %title%))

The whole time I thought I needed something like "if length/amount of %subsong% is greater than 1, then list, else don't list", but when I just simply added '%subsong%' to the standard code for testing, I witnessed all singletrack files returning a %subsong% of 0! So that's when I knew the only integer for this code to work is 0!

So now multitrack files (with embedded cuesheet) are expandable just like directories, while singletrack files remain unexpandable.

Note: I haven't tested it with multitrack files with separate cuesheet.

Media Library Viewer & (embedded) cuesheets

Reply #8
If it works it works, and that's good, but I'm surprised the 2nd line works:
Code: [Select]
$if($greater(%subsong%,0)

This has a surplus bracket:
$if($greater(%subsong%,0),|%tracknumber% - %title%))

shouldn't it be:
$ifgreater(%subsong%,0,THEN...,OTHERWISE....)
So ....
Code: [Select]
$replace($directory_path($substr(%path%,12,999)),'\','|')|%filename_ext%$ifgreater(%subsong%,0,|%tracknumber% - %title%,)

i.e. if subsong > 0, THEN %tracknumber% - %title%, OTHERWISE nothing

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

Media Library Viewer & (embedded) cuesheets

Reply #9
You're right, there's one bracket too much, nonetheless it seems to work fine.
The code is also logical; $greater(%subsong%,0) returns a TRUE in case of multitrack files in which case the subsongs get the %tracknumber% - %title% format.
Frankly $if($greater( , ), ) is the same as $ifgreater( , , , ), but anyway, your code works fine too, so thanks again!

Media Library Viewer & (embedded) cuesheets

Reply #10
The code is also logical; $greater(%subsong%,0) returns a TRUE in case of multitrack files in which case the subsongs get the %tracknumber% - %title% format.

Ah, interesting. That's useful to know. Didn't realise that's how $greater worked.

Cheers,

C.


PC = TAK + LossyWAV  ::  Portable = Opus (130)