ItemFactory implementations should provide upload directory path.
public string category;
public string upnp_class;
public string resources_class_path;
+ public string upload_dir;
public ArrayList<ArrayList<string>> key_chains;
public TrackerItemFactory (string category,
string upnp_class,
- string resources_class_path) {
+ string resources_class_path,
+ string upload_dir) {
this.category = category;
this.upnp_class = upnp_class;
this.resources_class_path = resources_class_path;
+ this.upload_dir = upload_dir;
this.key_chains = new ArrayList<ArrayList<string>> ();
private const string CATEGORY = "nmm:MusicPiece";
public TrackerMusicItemFactory () {
- base (CATEGORY, MediaItem.MUSIC_CLASS, MUSIC_RESOURCES_CLASS_PATH);
+ base (CATEGORY,
+ MediaItem.MUSIC_CLASS,
+ MUSIC_RESOURCES_CLASS_PATH,
+ Environment.get_user_special_dir (UserDirectory.MUSIC));
for (var i = this.key_chains.size; i < MusicMetadata.LAST_KEY; i++) {
this.key_chains.add (new ArrayList<string> ());
private const string CATEGORY = "nmm:Photo";
public TrackerPictureItemFactory () {
- base (CATEGORY, MediaItem.IMAGE_CLASS, PHOTO_RESOURCES_CLASS_PATH);
+ base (CATEGORY,
+ MediaItem.IMAGE_CLASS,
+ PHOTO_RESOURCES_CLASS_PATH,
+ Environment.get_user_special_dir (UserDirectory.PICTURES));
for (var i = this.key_chains.size; i < PictureMetadata.LAST_KEY; i++) {
this.key_chains.add (new ArrayList<string> ());
private const string CATEGORY = "nmm:Video";
public TrackerVideoItemFactory () {
- base (CATEGORY, MediaItem.VIDEO_CLASS, VIDEO_RESOURCES_CLASS_PATH);
+ base (CATEGORY,
+ MediaItem.VIDEO_CLASS,
+ VIDEO_RESOURCES_CLASS_PATH,
+ Environment.get_user_special_dir (UserDirectory.VIDEOS));
for (var i = this.key_chains.size; i < VideoMetadata.LAST_KEY; i++) {
this.key_chains.add (new ArrayList<string> ());