28 Components.utils.import(
"resource://app/jsmodules/sbProperties.jsm");
37 var localizationKeys = {
39 created:
'date_created',
40 updated:
'date_updated',
41 contentURL:
'content_url',
42 contentType:
'content_type',
45 trackName:
'track_name',
46 albumName:
'album_name',
47 artistName:
'artist_name',
48 trackType:
'track_source',
52 trackNumber:
'track_no',
53 discNumber:
'disc_no',
54 totalDiscs:
'total_discs',
55 totalTracks:
'total_tracks',
56 isPartOfCompilation:
'is_part_of_compilation',
57 producerName:
'producer',
58 composerName:
'composer',
59 conductorName:
'conductor',
60 lyricistName:
'lyricist',
62 recordLabelName:
'record_label_name',
63 primaryImageURL:
'primary_image_url',
64 lastPlayTime:
'last_play_time',
66 lastSkipTime:
'last_skip_time',
67 skipCount:
'skip_count',
69 sampleRate:
'samplerate',
75 copyright:
'copyright',
76 copyrightURL:
'copyright_url',
78 metadataUUID:
'metadata_uuid',
79 softwareVendor:
'vendor',
80 originURL:
'origin_url',
81 destination:
'destination',
83 columnSpec:
'column_spec',
84 defaultColumnSpec:
'default_column_spec',
85 originPage:
'origin_page',
86 artistDetailUrl:
'artist_detail_url',
87 albumDetailUrl:
'album_detail_url',
88 originPageTitle:
'origin_pagetitle',
89 downloadButton:
'download_button',
90 downloadDetails:
'download_details',
92 originPageImage:
'origin_page_image',
93 artistDetailImage:
'artist_detail_image',
94 albumDetailImage:
'album_detail_image',
95 rapiScopeURL:
'rapi_scope_url',
96 rapiSiteID:
'rapi_site_id',
97 mediaListName:
'media_list_name',
98 defaultMediaPageURL:
'default_mediapage_url',
99 availability:
'availability',
100 albumArtistName:
'albumartistname',
101 cdRipStatus:
'cdrip_status',
102 shouldRip:
'shouldrip',
103 keywords:
'keywords',
104 description:
'description',
105 showName:
'showName',
106 episodeNumber:
'episodeNumber',
107 seasonNumber:
'seasonNumber',
108 playlistURL:
'playlist_url',
109 metadataHashIdentity:
'metadata_hash_identity'
113 var specialLocalizationKeys = {
114 "http://songbirdnest.com/dummy/smartmedialists/1.0#playlist":
115 "property.dummy.playlist",
119 Components.classes[
"@songbirdnest.com/Songbird/Properties/PropertyManager;1"]
120 .getService(Components.interfaces.sbIPropertyManager);
124 for (var prop in localizationKeys) {
125 info = propMgr.getPropertyInfo(SBProperties[prop]);
128 info.localizationKey,
129 "Property does not have expected localization info");
130 }
catch (e
if e ==
Cr.NS_ERROR_ABORT) {
136 var propEnum = propMgr.propertyIDs;
137 while (propEnum.hasMore()) {
138 var propID = propEnum.getNext();
139 var
propName = propID.replace(SBProperties.base,
"");
140 if (propName in localizationKeys) {
144 info = propMgr.getPropertyInfo(propID);
146 if (propID in specialLocalizationKeys) {
149 info.localizationKey,
150 "Property does not have expected special localization info");
154 "Property has unknown custom localization info");
156 }
catch (e
if e ==
Cr.NS_ERROR_ABORT) {
dataSBHighestRatedArtists SBProperties rating
function assertEqual(aExpected, aActual, aMessage)
BogusChannel prototype contentLength
function runTest()
Advanced DataRemote unit tests.
var getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow('Songbird SBProperties playCount