1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-23 15:23:32 +01:00

Add Songbird specific services to the services module.

This commit is contained in:
Doug Kearns
2009-11-17 23:11:28 +11:00
parent c22e7d38d0
commit 9b20a59d2a
3 changed files with 32 additions and 26 deletions

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2009 by Prathyush Thota <prathyushthota@gmail.com>
// Copyright (c) 2009 by Doug Kearns <dougkearns@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
@@ -9,7 +10,7 @@ const Library = Module("library", {
this.MAIN_LIBRARY = LibraryUtils.mainLibrary;
},
_toJSArray: function (enum) ArrayConverter.JSArray(enum),
_toJSArray: function _toJSArray(enum) ArrayConverter.JSArray(enum),
// TODO: return some actually useful objects. ;-)
/**
@@ -42,8 +43,7 @@ const Library = Module("library", {
* @returns {string[]}
*/
getTracks: function getTracks(artist, album) {
const properties = Cc["@songbirdnest.com/Songbird/Properties/MutablePropertyArray;1"]
.createInstance(Ci.sbIMutablePropertyArray);
let properties = services.create("mutablePropertyArray");
properties.appendProperty(SBProperties.artistName, artist);
properties.appendProperty(SBProperties.albumName, album);