Skip to content

Commit d2f46af

Browse files
Compile Groovy Scripts
1 parent 2ba10a7 commit d2f46af

6 files changed

+68
-6
lines changed

compiled/posix_movie.groovy

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
def user = System.getProperty("user.name")
33
def mntp = "/run/media/$user"
4-
def override = "$mntp/Videos"
4+
def override = "$mntp"
55
def guess = [
66
home,
77
"$mntp/Data",
@@ -12,7 +12,9 @@
1212
].collect { it as File }.sort { a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()
1313
def final_ = override ? override : guess
1414
"$final_/"
15-
}{
15+
}
16+
Videos/
17+
{
1618
def cjk_countries = /(CN|KR|JP|TW|HK)/
1719
def cjkani_tags = /(Aeni|Donghua|Anime)/
1820
def isAnime = genres =~ cjkani_tags || (genres =~ /Animation/ && country =~ cjk_countries) || anime ? true : false

compiled/posix_music_shared.groovy

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
def user = System.getProperty("user.name")
3+
def mntp = "/run/media/$user"
4+
def override = "$mntp"
5+
def guess = [
6+
home,
7+
"$mntp/Data",
8+
"$mntp/Music",
9+
"$mntp/Videos",
10+
"$mntp/Games",
11+
"$mntp/Books"
12+
].collect { it as File }.sort { a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()
13+
def final_ = override ? override : guess
14+
"$final_/"
15+
}
16+
Torrent Uploads/
17+
{ext.upper()}/
18+
{y}/
19+
[
20+
{d.format("yyyy.MM.dd")}
21+
] {album} - {n} [
22+
{ext.upper()}
23+
{ext == "flac" ? " " + "${ bitdepth > 16 ? bitdepth + '-' : ''}" + khz : ""}
24+
]
25+
{media.CATALOGNUMBER ? "[" + media.CATALOGNUMBER + "]" : ""}/
26+
{dc? di + "-": ""}{pi.pad(2)} {t}
27+
{media.ISRC ? " [" + media.ISRC + "]" : ""}

compiled/posix_tv.groovy

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
def user = System.getProperty("user.name")
33
def mntp = "/run/media/$user"
4-
def override = "$mntp/Videos"
4+
def override = "$mntp"
55
def guess = [
66
home,
77
"$mntp/Data",
@@ -12,7 +12,9 @@
1212
].collect { it as File }.sort { a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()
1313
def final_ = override ? override : guess
1414
"$final_/"
15-
}{
15+
}
16+
Videos/
17+
{
1618
def cjk_countries = /(CN|KR|JP|TW|HK)/
1719
def cjkani_tags = /(Aeni|Donghua|Anime)/
1820
def isAnime = genres =~ cjkani_tags || (genres =~ /Animation/ && country =~ cjk_countries) || anime ? true : false

compiled/windows_movie.groovy

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
].collect { it as File }.sort { a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()
1212
def final_ = override ? override : guess
1313
"$final_/"
14-
}{
14+
}
15+
Videos/
16+
{
1517
def cjk_countries = /(CN|KR|JP|TW|HK)/
1618
def cjkani_tags = /(Aeni|Donghua|Anime)/
1719
def isAnime = genres =~ cjkani_tags || (genres =~ /Animation/ && country =~ cjk_countries) || anime ? true : false

compiled/windows_music_shared.groovy

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
def user = System.getProperty("user.name")
3+
def mntp = "/run/media/$user"
4+
def override = "$mntp"
5+
def guess = [
6+
home,
7+
"$mntp/Data",
8+
"$mntp/Music",
9+
"$mntp/Videos",
10+
"$mntp/Games",
11+
"$mntp/Books"
12+
].collect { it as File }.sort { a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()
13+
def final_ = override ? override : guess
14+
"$final_/"
15+
}
16+
Torrent Uploads/
17+
{ext.upper()}/
18+
{y}/
19+
[
20+
{d.format("yyyy.MM.dd")}
21+
] {album} - {n} [
22+
{ext.upper()}
23+
{ext == "flac" ? " " + "${ bitdepth > 16 ? bitdepth + '-' : ''}" + khz : ""}
24+
]
25+
{media.CATALOGNUMBER ? "[" + media.CATALOGNUMBER + "]" : ""}/
26+
{dc? di + "-": ""}{pi.pad(2)} {t}
27+
{media.ISRC ? " [" + media.ISRC + "]" : ""}

compiled/windows_tv.groovy

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
].collect { it as File }.sort { a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()
1212
def final_ = override ? override : guess
1313
"$final_/"
14-
}{
14+
}
15+
Videos/
16+
{
1517
def cjk_countries = /(CN|KR|JP|TW|HK)/
1618
def cjkani_tags = /(Aeni|Donghua|Anime)/
1719
def isAnime = genres =~ cjkani_tags || (genres =~ /Animation/ && country =~ cjk_countries) || anime ? true : false

0 commit comments

Comments
 (0)