});
},
- commandline: function () {
+ commandline: function initCommandline() {
player.CommandMode = Class("CommandSearchViewMode", modules.CommandMode, {
init: function init(mode) {
this.mode = mode;
get onSubmit() player.closure.onSearchSubmit
});
},
- commands: function () {
+ commands: function initCommands() {
commands.add(["f[ilter]"],
"Filter tracks based on keywords {genre/artist/album/track}",
function (args) {
},
{ argCount: "1" });
},
- completion: function () {
+ completion: function initCompletion() {
completion.album = function album(context, artist) {
context.title = ["Album"];
context.completions = [[v, ""] for ([, v] in Iterator(library.getAlbums(artist)))];
context.completions = [[v, ""] for ([, v] in Iterator(library.getTracks(artist, album)))];
};
},
- mappings: function () {
+ mappings: function initMappings() {
mappings.add([modes.PLAYER],
["x"], "Play track",
function () { ex.playerplay(); });
mappings.add([modes.PLAYER],
["z"], "Previous track",
- function (args) { ex.playerprev({ "#": args.count }); },
+ function ({ count }) { ex.playerprev({ "#": count }); },
{ count: true });
mappings.add([modes.PLAYER],
mappings.add([modes.PLAYER],
["b"], "Next track",
- function (args) { ex.playernext({ "#": args.count }); },
+ function ({ count }) { ex.playernext({ "#": count }); },
{ count: true });
mappings.add([modes.PLAYER],
mappings.add([modes.PLAYER],
["h", "<Left>"], "Seek -10s",
- function (args) { player.seekBackward(Math.max(1, args.count) * 10000); },
+ function ({ count} ) { player.seekBackward(Math.max(1, count) * 10000); },
{ count: true });
mappings.add([modes.PLAYER],
["l", "<Right>"], "Seek +10s",
- function (args) { player.seekForward(Math.max(1, args.count) * 10000); },
+ function ({ count} ) { player.seekForward(Math.max(1, count) * 10000); },
{ count: true });
mappings.add([modes.PLAYER],
["H", "<S-Left>"], "Seek -1m",
- function (args) { player.seekBackward(Math.max(1, args.count) * 60000); },
+ function ({ count }) { player.seekBackward(Math.max(1, count) * 60000); },
{ count: true });
mappings.add([modes.PLAYER],
["L", "<S-Right>"], "Seek +1m",
- function (args) { player.seekForward(Math.max(1, args.count) * 60000); },
+ function ({ count }) { player.seekForward(Math.max(1, count) * 60000); },
{ count: true });
mappings.add([modes.PLAYER],
};
}
},
- options: function () {
+ options: function initOptions() {
options.add(["repeat"],
"Set the playback repeat mode",
"number", 0,
}
});
-// vim: set fdm=marker sw=4 ts=4 et:
+// vim: set fdm=marker sw=4 sts=4 ts=8 et: