Skip to main content

Topic: foobar grouping by folder from root of disc; grouping by tag (Read 8418 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • _duke_
  • [*]
foobar grouping by folder from root of disc; grouping by tag
Hello, i have a few question)

1. Grouping by filepath
how can i create grouping in playlist from root of disc?
i known only "$directory(x,n)". but he start from file.

for example i have hierarchy of dirrectories:

d:\Music\Rock\Splean\album1
d:\Music\Rock\Splean\album2
d:\Music\Rock\Splean\album3
d:\Music\Ellectronic\dub\Netslov\album1
d:\Music\Ellectronic\dub\Netslov\2010\album1
d:\Music\Ellectronic\dub\Netslov\2010\album2
d:\Music\Ellectronic\dub\Netslov\album3
create a few rules is matterless becouse hierarchy is different.

2. QuickTag interface
In foobar i tag file by context menu:

it's terrible!) for example, in uTorrent when you do right click on tag column you see this menu:

it's simple and fast.
How can i make tag list like uTorrent? Or maybe create a downdrop…

3. Group by drag'n'drop
How can i create group like folder in playlist? At now files group by addres or costume tag, but what if create group do not depended of file? I just drug file in this, and file move to group)

4. Radio label
Also, i don't know how name radio url. QuickTag don't tagged him. There is need group like folder, but i don't know how make them.

Thx, and sorry for my bad Eng.
  • Last Edit: 05 October, 2010, 07:35:26 AM by _duke_

foobar grouping by folder from root of disc; grouping by tag
Reply #1
1. something like: $substr(%path%,1,3) should work

  • _duke_
  • [*]
foobar grouping by folder from root of disc; grouping by tag
Reply #2
1. something like: $substr(%path%,1,3) should work


nope(
if code like this:
$substr(%path%,22,10)

Result:
Ozzy Osbour
Pearl Jam/C
PINK FLOYD
PLACEBO/Pla
RAMONA FALL
SHERYL CROW
  • Last Edit: 05 October, 2010, 10:52:51 AM by _duke_

foobar grouping by folder from root of disc; grouping by tag
Reply #3
and if code like this:
$substr(%path%,1,3)  ...as I told you   

Result:
D\:

  • ojdo
  • [*][*][*][*][*]
foobar grouping by folder from root of disc; grouping by tag
Reply #4
The official Titleformat help (in the main menu Help) is your friend:
Code: [Select]
$directory_path(%path%)
  • Last Edit: 06 October, 2010, 12:04:20 PM by ojdo

  • _duke_
  • [*]
foobar grouping by folder from root of disc; grouping by tag
Reply #5
and if code like this:
$substr(%path%,1,3)  ...as I told you   

Result:
D\:



emm) thank you, but how this code help me? maybe i bad explain, i try again)

i need group track in my playlist, for exaple by artist.
i have this directory hierarchy:

d:\Music\Rock\Splean\album3\cd1\1.mp3
d:\Music\Rock\Splean\album3\cd2\2.mp3
d:\Music\Rock\Splean\album2\3.mp3
d:\Music\Rock\Splean\4.mp3

and i have a varible: $directory(x,n) (he started from file)

Code: [Select]
$directory(%path%,1)


give us:

Code: [Select]
cd1 --------
1
cd2 --------
2
album2 --------
3
Splean --------
4


that's bad. But, if this varible start from root...

Code: [Select]
$directoryFromRoot(%path%,4)


it give us:

Code: [Select]
Splean --------
1
2
3
4


but varible "$directoryFromRoot(x,n)" does not exist! ?_?
what can i do?

maybe exists any way to create this grouping? or maybe nobody use grouping, and i wrong? But i think is normal goup files by artist and album..
I see grouping by ID3 tag, but it's not variant.

  • _duke_
  • [*]
foobar grouping by folder from root of disc; grouping by tag
Reply #6
The official Titleformat help (in the main menu Help) is your friend:
Code: [Select]
$directory_path(%path%)


"is your friend" =D

i allready see it varible, and sure i first read manual, but i need part of address, becouse if playlist include many files from different folders it's mean 1 group per 1 file
  • Last Edit: 06 October, 2010, 01:42:24 PM by _duke_

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
foobar grouping by folder from root of disc; grouping by tag
Reply #7
but varible "$directoryFromRoot(x,n)" does not exist! ?_?
what can i do?
Well you'd probably have to write such a function yourself.

Strip the first part of the path (till first backslash):
Code: [Select]
$puts(d1,$substr(%path%,$add($strchr(%path%,\),1),999))
Strip the second part of the path:
Code: [Select]
$puts(d2,$substr($get(d1),$add($strchr($get(d1),\),1),999))
Etc.
Finally print only the characters till the next backslash:
Code: [Select]
$substr($get(d2),0,$sub($strchr($get(d2),\),1))

Full-quoting makes you scroll past the same junk over and over.

  • herojoker
  • [*][*][*][*]
foobar grouping by folder from root of disc; grouping by tag
Reply #8
Here is a one-liner alternative for the N-th directory from the root:
Code: [Select]
$directory($replace(%path%,:,),$sub($sub($len(%path%),$len($replace(%path%,\,))),N))

N=0 yields the very root (hard drive)
N=1 yields the first directory level
etc.

If you want the actual file to be captured as the highest level, replace "%path%" by "%path%\" everywhere.
  • Last Edit: 06 October, 2010, 05:52:32 PM by herojoker

  • _duke_
  • [*]
foobar grouping by folder from root of disc; grouping by tag
Reply #9

foobar grouping by folder from root of disc; grouping by tag
Reply #10
The official Titleformat help (in the main menu Help) is your friend:
Code: [Select]
$directory_path(%path%)

thankyou~it works

foobar grouping by folder from root of disc; grouping by tag
Reply #11
@herojoker:
Your line fails to consider reading from archives and archives with subfolders. Expanding the $replace fixes this:
Code: [Select]
$directory(%path%,$sub($len(%path%),$len($replace(%path%,\,,|,,/,)),N))
Also not nesting $sub and lremoving the unneeded replacement of the path colon makes this even shorter. As with your version N must be replaced by the desired path depth.

(This post is designated to all the ppl finding this topic even if it's 2 years old :p)