summaryrefslogtreecommitdiff
path: root/scripts/_dump_playlists.lua
blob: a6bc23661a44769679cbf0ee291c87d6a9435579 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ardour { ["type"] = "Snippet", name = "Dump Playlists" }

function factory () return function ()

	print ("Number of playlists:", Session:playlists():n_playlists())

	print ()
	print ("Used playlists:")
	for p in Session:playlists():get_used():iter() do
		print ("-", p:name(), p:n_regions())
	end

	print ()
	print ("Unused playlists:")
	for p in Session:playlists():get_unused():iter() do
		print ("-", p:name(), p:n_regions())
	end

	print ()
	print ("Playlists by Track:")
	for r in Session:get_tracks():iter() do
		print ("*", r:name())
		for p in Session:playlists():playlists_for_track (r:to_track()):iter() do
			print ("  -", p:name(), p:n_regions())
		end
	end
end end