IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
foobar grouping by folder from root of disc; grouping by tag
_duke_
post Oct 5 2010, 11:58
Post #1





Group: Members
Posts: 8
Joined: 5-October 10
Member No.: 84353



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.

This post has been edited by _duke_: Oct 5 2010, 12:35
Go to the top of the page
+Quote Post
vogliadicane
post Oct 5 2010, 15:29
Post #2





Group: Members
Posts: 299
Joined: 17-February 09
Member No.: 67105



1. something like: $substr(%path%,1,3) should work
Go to the top of the page
+Quote Post
_duke_
post Oct 5 2010, 15:52
Post #3





Group: Members
Posts: 8
Joined: 5-October 10
Member No.: 84353



QUOTE (vogliadicane @ Oct 5 2010, 16:29) *
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

This post has been edited by _duke_: Oct 5 2010, 15:52
Go to the top of the page
+Quote Post
vogliadicane
post Oct 6 2010, 16:40
Post #4





Group: Members
Posts: 299
Joined: 17-February 09
Member No.: 67105



and if code like this:
$substr(%path%,1,3) ...as I told you rolleyes.gif

Result:
D\:
Go to the top of the page
+Quote Post
ojdo
post Oct 6 2010, 17:02
Post #5





Group: Members
Posts: 894
Joined: 18-June 06
From: Germany
Member No.: 31980



The official Titleformat help (in the main menu Help) is your friend:
CODE
$directory_path(%path%)


This post has been edited by ojdo: Oct 6 2010, 17:04


--------------------
http://freemusi.cc/
Go to the top of the page
+Quote Post
_duke_
post Oct 6 2010, 18:30
Post #6





Group: Members
Posts: 8
Joined: 5-October 10
Member No.: 84353



QUOTE (vogliadicane @ Oct 6 2010, 17:40) *
and if code like this:
$substr(%path%,1,3) ...as I told you rolleyes.gif

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
$directory(%path%,1)


give us:

CODE
cd1 --------
1
cd2 --------
2
album2 --------
3
Splean --------
4


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

CODE
$directoryFromRoot(%path%,4)


it give us:

CODE
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.
Go to the top of the page
+Quote Post
_duke_
post Oct 6 2010, 18:40
Post #7





Group: Members
Posts: 8
Joined: 5-October 10
Member No.: 84353



QUOTE (ojdo @ Oct 6 2010, 18:02) *
The official Titleformat help (in the main menu Help) is your friend:
CODE
$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

This post has been edited by _duke_: Oct 6 2010, 18:42
Go to the top of the page
+Quote Post
Yirkha
post Oct 6 2010, 22:07
Post #8





Group: FB2K Moderator
Posts: 2359
Joined: 30-November 07
Member No.: 49158



QUOTE (_duke_ @ Oct 6 2010, 19:30) *
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
$puts(d1,$substr(%path%,$add($strchr(%path%,\),1),999))
Strip the second part of the path:
CODE
$puts(d2,$substr($get(d1),$add($strchr($get(d1),\),1),999))
Etc.
Finally print only the characters till the next backslash:
CODE
$substr($get(d2),0,$sub($strchr($get(d2),\),1))



--------------------
Full-quoting makes you scroll past the same junk over and over.
Go to the top of the page
+Quote Post
herojoker
post Oct 6 2010, 22:52
Post #9





Group: Members
Posts: 305
Joined: 12-September 07
Member No.: 46989



Here is a one-liner alternative for the N-th directory from the root:
CODE
$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.

This post has been edited by herojoker: Oct 6 2010, 22:52
Go to the top of the page
+Quote Post
_duke_
post Oct 8 2010, 09:14
Post #10





Group: Members
Posts: 8
Joined: 5-October 10
Member No.: 84353



QUOTE (Yirkha @ Oct 6 2010, 23:07) *

QUOTE (herojoker @ Oct 6 2010, 23:52) *

thank you all! it's work, i'am happy))
Go to the top of the page
+Quote Post
jazzmelody
post Jun 14 2012, 07:44
Post #11





Group: Members
Posts: 1
Joined: 14-June 12
Member No.: 100691



QUOTE (ojdo @ Oct 6 2010, 17:02) *
The official Titleformat help (in the main menu Help) is your friend:
CODE
$directory_path(%path%)

thankyou~it works
Go to the top of the page
+Quote Post
lossycrypt
post Sep 26 2012, 10:27
Post #12





Group: Members
Posts: 9
Joined: 11-May 11
Member No.: 90527



@herojoker:
Your line fails to consider reading from archives and archives with subfolders. Expanding the $replace fixes this:
CODE
$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)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 1st November 2014 - 00:03