summaryrefslogtreecommitdiff
path: root/share/scripts/_dump_playlists.lua
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts/_dump_playlists.lua')
-rw-r--r--share/scripts/_dump_playlists.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/share/scripts/_dump_playlists.lua b/share/scripts/_dump_playlists.lua
new file mode 100644
index 0000000000..656a5ead97
--- /dev/null
+++ b/share/scripts/_dump_playlists.lua
@@ -0,0 +1,31 @@
+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
+ if (p == r:to_track():playlist()) then
+ print (" >-", p:name(), p:n_regions())
+ else
+ print (" -", p:name(), p:n_regions())
+ end
+ end
+ end
+end end