Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 7 commits
  • 17 files changed
  • 0 commit comments
  • 1 contributor
View
3  glwthemes/default/pages/album.view
@@ -12,7 +12,6 @@ widget(keyintercept, {
padding: 5;
spacing: 5;
-
widget(frontdrop, {
source: "theme://graphics/boxart-overlay.png";
border: 8;
@@ -45,8 +44,6 @@ widget(keyintercept, {
filterConstraintX: true;
widget(list_y, {
id: "list";
- &clone.focused = focusedChild();
-
cloner($page.model.nodes, loader, {
time: 0.1;
effect: blend;
View
25 glwthemes/default/pages/iteminfo/video.view
@@ -32,8 +32,8 @@ widget(container_y, {
margin: -4;
widget(image, {
width: $ui.width / 6;
- source: $args.metadata.icon;
- hidden: select($args.metadata.icon, false, true);
+ source: $args.metadata.icon ??
+ "dataroot://resources/svg/Movie.svg";
});
});
});
@@ -62,6 +62,9 @@ widget(container_y, {
widget(label, {
TextStyleItem();
caption: '<font color="#888">' + _("Duration:") + ' </font>' +
+ select($args.restartpos > 0,
+ value2duration($args.restartpos) + ' / ',
+ '') +
value2duration($args.metadata.duration);
});
@@ -126,7 +129,23 @@ widget(container_y, {
$args.metadata.producer;
});
+
+ widget(label, {
+ align: left;
+ caption: '<font color="#888">' + _("File date:") + ' </font>' +
+ strftime($args.metadata.timestamp, "%F");
+ TextStyleItem();
+ });
+
+ widget(label, {
+ caption: fmt(_pl('Seen %d times', "Seen %d time", $args.playcount), $args.playcount);
+ TextStyleItem();
+ });
+
+
space(1);
+
+
@@ -143,6 +162,8 @@ widget(container_y, {
caption: $args.metadata.description;
});
+
+
space(1);
widget(label, {
View
6 glwthemes/default/pages/listitems/albumtrack.view
@@ -27,9 +27,11 @@ widget(backdrop, {
shadow: true;
color: select(isFocused(), 1.0, 0.6);
- caption: fmt("%02d", $self.metadata.track);
+ caption: select($self.metadata.track > 0,
+ fmt("%02d", $self.metadata.track),
+ "");
});
-
+
widget(label, {
filterConstraintX: true;
font: $ui.font;
View
5 src/event.c
@@ -167,6 +167,7 @@ static struct strtab actionnames[] = {
{ "SubtitleTrack", ACTION_CYCLE_SUBTITLE },
{ "ReloadData", ACTION_RELOAD_DATA },
+ { "Playqueue", ACTION_PLAYQUEUE },
};
@@ -469,9 +470,9 @@ event_dispatch(event_t *e)
} else if(event_is_action(e, ACTION_NAV_BACK) ||
event_is_action(e, ACTION_NAV_FWD) ||
event_is_action(e, ACTION_HOME) ||
+ event_is_action(e, ACTION_PLAYQUEUE) ||
event_is_action(e, ACTION_RELOAD_DATA) ||
event_is_type(e, EVENT_OPENURL)) {
-
event_to_prop(prop_get_by_name(PNVEC("global", "nav", "eventsink"),
1, NULL), e);
@@ -524,7 +525,7 @@ event_dispatch(event_t *e)
*/
const static int action_from_fkey[13][2] = {
{ 0, 0 },
- { ACTION_MENU, 0 },
+ { ACTION_MENU, ACTION_PLAYQUEUE },
{ ACTION_SHOW_MEDIA_STATS, 0 },
{ ACTION_ITEMMENU, 0 },
{ ACTION_LOGWINDOW, ACTION_ENABLE_SCREENSAVER },
View
2  src/event.h
@@ -113,6 +113,8 @@ typedef enum {
ACTION_RELOAD_DATA,
+ ACTION_PLAYQUEUE,
+
ACTION_mappable_end,
} action_type_t;
View
2  src/fileaccess/fa_backend.c
@@ -173,7 +173,7 @@ file_open_file(prop_t *page, const char *url, fa_stat_t *fs)
metadb_close(db);
if(md == NULL)
- md = fa_probe_metadata(url, errbuf, sizeof(errbuf));
+ md = fa_probe_metadata(url, errbuf, sizeof(errbuf), NULL);
if(md == NULL) {
nav_open_errorf(page, _("Unable to open file: %s"), errbuf);
View
2  src/fileaccess/fa_locatedb.c
@@ -277,7 +277,7 @@ fa_locate_searcher (fa_search_t *fas)
ctype = CONTENT_DIR;
prop_set_string(prop_create(metadata, "title"), basename(buf));
} else {
- metadata_t *md = fa_probe_metadata(url, NULL, 0);
+ metadata_t *md = fa_probe_metadata(url, NULL, 0, NULL);
if(md != NULL) {
ctype = md->md_contenttype;
metadata_destroy(md);
View
23 src/fileaccess/fa_probe.c
@@ -170,7 +170,7 @@ fa_probe_playlist(metadata_t *md, const char *url, uint8_t *pb, size_t pbsize)
* Probe SPC files
*/
static void
-fa_probe_spc(metadata_t *md, uint8_t *pb)
+fa_probe_spc(metadata_t *md, const uint8_t *pb, const char *filename)
{
char buf[33];
buf[32] = 0;
@@ -191,6 +191,7 @@ fa_probe_spc(metadata_t *md, uint8_t *pb)
buf[3] = 0;
md->md_duration = atoi(buf);
+ md->md_track = filename ? atoi(filename) : 0;
}
@@ -257,7 +258,8 @@ fa_probe_exif(metadata_t *md, const char *url, uint8_t *pb, fa_handle_t *fh)
* pb is guaranteed to point to at least 256 bytes of valid data
*/
static int
-fa_probe_header(metadata_t *md, const char *url, fa_handle_t *fh)
+fa_probe_header(metadata_t *md, const char *url, fa_handle_t *fh,
+ const char *filename)
{
uint16_t flags;
uint8_t buf[256];
@@ -266,7 +268,7 @@ fa_probe_header(metadata_t *md, const char *url, fa_handle_t *fh)
return 0;
if(!memcmp(buf, "SNES-SPC700 Sound File Data", 27)) {
- fa_probe_spc(md, buf);
+ fa_probe_spc(md, buf, filename);
md->md_contenttype = CONTENT_AUDIO;
return 1;
}
@@ -500,7 +502,8 @@ gme_probe(metadata_t *md, const char *url, fa_handle_t *fh)
*
*/
static void
-fa_lavf_load_meta(metadata_t *md, AVFormatContext *fctx, const char *url)
+fa_lavf_load_meta(metadata_t *md, AVFormatContext *fctx, const char *url,
+ const char *filename)
{
int i;
char tmp1[1024];
@@ -523,7 +526,8 @@ fa_lavf_load_meta(metadata_t *md, AVFormatContext *fctx, const char *url)
md->md_contenttype = CONTENT_AUDIO;
md->md_title = ffmpeg_metadata_rstr(fctx->metadata, "title");
- md->md_track = ffmpeg_metadata_int(fctx->metadata, "track", 0);
+ md->md_track = ffmpeg_metadata_int(fctx->metadata, "track",
+ filename ? atoi(filename) : 0);
} else {
int atrack = 0;
@@ -591,7 +595,8 @@ fa_lavf_load_meta(metadata_t *md, AVFormatContext *fctx, const char *url)
*
*/
metadata_t *
-fa_probe_metadata(const char *url, char *errbuf, size_t errsize)
+fa_probe_metadata(const char *url, char *errbuf, size_t errsize,
+ const char *filename)
{
AVFormatContext *fctx;
@@ -609,7 +614,7 @@ fa_probe_metadata(const char *url, char *errbuf, size_t errsize)
fa_seek(fh, 0, SEEK_SET);
- if(fa_probe_header(md, url, fh)) {
+ if(fa_probe_header(md, url, fh, filename)) {
fa_close(fh);
return md;
}
@@ -622,7 +627,7 @@ fa_probe_metadata(const char *url, char *errbuf, size_t errsize)
return NULL;
}
- fa_lavf_load_meta(md, fctx, url);
+ fa_lavf_load_meta(md, fctx, url, filename);
fa_libav_close_format(fctx);
return md;
}
@@ -635,7 +640,7 @@ metadata_t *
fa_metadata_from_fctx(AVFormatContext *fctx, const char *url)
{
metadata_t *md = metadata_create();
- fa_lavf_load_meta(md, fctx, url);
+ fa_lavf_load_meta(md, fctx, url, NULL);
return md;
}
View
3  src/fileaccess/fa_probe.h
@@ -32,6 +32,7 @@ int fa_probe_iso(struct metadata *md, fa_handle_t *fh);
metadata_t *fa_metadata_from_fctx(struct AVFormatContext *fctx,
const char *url);
-metadata_t *fa_probe_metadata(const char *url, char *errbuf, size_t errsize);
+metadata_t *fa_probe_metadata(const char *url, char *errbuf, size_t errsize,
+ const char *filename);
#endif /* FA_PROBE_H */
View
83 src/fileaccess/fa_scanner.c
@@ -191,6 +191,7 @@ static struct strtab postfixtab[] = {
{ "sub", CONTENT_UNKNOWN },
{ "exe", CONTENT_UNKNOWN },
{ "tmp", CONTENT_UNKNOWN },
+ { "db", CONTENT_UNKNOWN },
};
@@ -242,7 +243,8 @@ deep_probe(fa_dir_entry_t *fde, scanner_t *s)
if(fde->fde_type == CONTENT_DIR)
fde->fde_md = fa_probe_dir(rstr_get(fde->fde_url));
else
- fde->fde_md = fa_probe_metadata(rstr_get(fde->fde_url), NULL, 0);
+ fde->fde_md = fa_probe_metadata(rstr_get(fde->fde_url), NULL, 0,
+ rstr_get(fde->fde_filename));
}
if(fde->fde_md != NULL) {
@@ -754,6 +756,64 @@ add_sort_option_dirfirst(scanner_t *s, prop_t *model)
}
+
+static void
+set_only_supported_files(void *opaque, prop_event_t event, ...)
+{
+ scanner_t *s = opaque;
+ va_list ap;
+ int val;
+
+ va_start(ap, event);
+
+ switch(event) {
+ case PROP_DESTROYED:
+ prop_unsubscribe(va_arg(ap, prop_sub_t *));
+ scanner_unref(s);
+ break;
+
+ case PROP_SET_INT:
+ val = va_arg(ap, int);
+ kv_url_opt_set(s->s_url, KVSTORE_PAGE_DOMAIN_SYS, "supportedfiles",
+ KVSTORE_SET_INT, val);
+ break;
+
+ default:
+ break;
+ }
+}
+
+/**
+ *
+ */
+static void
+add_only_supported_files(scanner_t *s, prop_t *model,
+ prop_t **valp)
+{
+ prop_t *parent = prop_create(model, "options");
+ prop_t *n = prop_create_root(NULL);
+ prop_t *m = prop_create(n, "metadata");
+ prop_t *value = *valp = prop_create(n, "value");
+ int v = kv_url_opt_get_int(s->s_url, KVSTORE_PAGE_DOMAIN_SYS,
+ "supportedfiles", 1);
+
+ prop_set_string(prop_create(n, "type"), "bool");
+ prop_set_int(prop_create(n, "enabled"), 1);
+ prop_set_int(value, v);
+
+ prop_link(_p("Show only supported files"), prop_create(m, "title"));
+
+ s->s_refcount++;
+ prop_subscribe(PROP_SUB_NO_INITIAL_UPDATE | PROP_SUB_TRACK_DESTROY,
+ PROP_TAG_CALLBACK, set_only_supported_files, s,
+ PROP_TAG_ROOT, value,
+ NULL);
+
+ if(prop_set_parent(n, parent))
+ prop_destroy(n);
+}
+
+
/**
*
*/
@@ -766,19 +826,13 @@ fa_scanner(const char *url, time_t url_mtime,
s->s_url = strdup(url);
prop_t *source = prop_create(model, "source");
-
+ prop_t *onlysupported;
struct prop_nf *pnf;
pnf = prop_nf_create(prop_create(model, "nodes"),
source,
prop_create(model, "filter"),
PROP_NF_AUTODESTROY);
-
-
-
- prop_nf_pred_str_add(pnf, "node.type",
- PROP_NF_CMP_EQ, "unknown", NULL,
- PROP_NF_MODE_EXCLUDE);
prop_nf_pred_int_add(pnf, "node.hidden",
PROP_NF_CMP_EQ, 1, NULL,
@@ -790,7 +844,18 @@ fa_scanner(const char *url, time_t url_mtime,
add_sort_option_type(s, model);
add_sort_option_dirfirst(s, model);
- decorated_browse_create(model, pnf);
+ add_only_supported_files(s, model, &onlysupported);
+ prop_nf_pred_str_add(pnf, "node.type",
+ PROP_NF_CMP_EQ, "unknown", onlysupported,
+ PROP_NF_MODE_EXCLUDE);
+
+ prop_nf_pred_str_add(pnf, "node.type",
+ PROP_NF_CMP_EQ, "file", onlysupported,
+ PROP_NF_MODE_EXCLUDE);
+
+
+
+ decorated_browse_create(model, pnf, source);
s->s_mtime = url_mtime;
s->s_playme = playme != NULL ? strdup(playme) : NULL;
View
31 src/metadata/decoration.c
@@ -123,16 +123,14 @@ static void load_nfo(deco_item_t *di);
static void
analyze_video(deco_item_t *di)
{
- if(di->di_url == NULL || di->di_duration == 0)
+ if(di->di_url == NULL || di->di_duration == 0 || di->di_filename == NULL)
return;
deco_browse_t *db = di->di_db;
- rstr_t *title = NULL;
+ rstr_t *title;
int year = 0;
- if(di->di_filename != NULL)
- title = metadata_filename_to_title(rstr_get(di->di_filename), &year);
-
+ title = metadata_filename_to_title(rstr_get(di->di_filename), &year);
metadata_bind_movie_info(&di->di_mlp, di->di_metadata,
di->di_url, title, year,
di->di_ds->ds_imdb_id ?: db->db_imdb_id,
@@ -290,7 +288,7 @@ album_analysis(deco_browse_t *db)
prop_set_string(db->db_prop_contents, "album");
- prop_nf_sort(db->db_pnf, "node.metadata.track", 0, 1, NULL, 1);
+ prop_nf_sort(db->db_pnf, "node.metadata.track", 0, 1, NULL, 0);
prop_t *m = prop_create_r(db->db_prop_model, "metadata");
prop_t *p;
@@ -548,7 +546,6 @@ static void
deco_browse_add_node(deco_browse_t *db, prop_t *p, deco_item_t *before)
{
deco_item_t *di = calloc(1, sizeof(deco_item_t));
-
di->di_db = db;
di->di_root = prop_ref_inc(p);
di->di_metadata = prop_create_r(p, "metadata");
@@ -726,6 +723,7 @@ deco_browse_node_cb(void *opaque, prop_event_t event, ...)
case PROP_SET_DIR:
case PROP_WANT_MORE_CHILDS:
+ case PROP_HAVE_MORE_CHILDS:
break;
case PROP_SET_VOID:
@@ -748,29 +746,22 @@ deco_browse_node_cb(void *opaque, prop_event_t event, ...)
*
*/
void
-decorated_browse_create(prop_t *model, struct prop_nf *pnf)
+decorated_browse_create(prop_t *model, struct prop_nf *pnf, prop_t *items)
{
- prop_t *src = prop_create(model, "source");
-
hts_mutex_lock(&deco_mutex);
deco_browse_t *db = calloc(1, sizeof(deco_browse_t));
TAILQ_INIT(&db->db_items);
db->db_sub = prop_subscribe(PROP_SUB_TRACK_DESTROY,
PROP_TAG_CALLBACK, deco_browse_node_cb, db,
- PROP_TAG_ROOT, src,
+ PROP_TAG_ROOT, items,
PROP_TAG_COURIER, deco_courier,
NULL);
- if(db->db_sub == NULL) {
- prop_nf_release(pnf);
- free(db);
- } else {
- db->db_pnf = pnf;
- LIST_INSERT_HEAD(&deco_browses, db, db_link);
- db->db_prop_model = prop_ref_inc(model);
- db->db_prop_contents = prop_ref_inc(prop_create(model, "contents"));
- }
+ db->db_pnf = pnf;
+ LIST_INSERT_HEAD(&deco_browses, db, db_link);
+ db->db_prop_model = prop_ref_inc(model);
+ db->db_prop_contents = prop_create_r(model, "contents");
hts_mutex_unlock(&deco_mutex);
}
View
3  src/metadata/metadata.h
@@ -301,7 +301,8 @@ int metadb_videoitem_set_preferred(void *db, const char *url, int64_t vid);
void decoration_init(void);
-void decorated_browse_create(struct prop *model, struct prop_nf *pnf);
+void decorated_browse_create(struct prop *model, struct prop_nf *pnf,
+ struct prop *items);
void metadata_init(void);
View
3  src/navigator.c
@@ -649,6 +649,9 @@ nav_eventsink(void *opaque, prop_event_t event, ...)
} else if(event_is_action(e, ACTION_HOME)) {
nav_open0(nav, NAV_HOME, NULL, NULL, NULL, NULL);
+ } else if(event_is_action(e, ACTION_PLAYQUEUE)) {
+ nav_open0(nav, "playqueue:", NULL, NULL, NULL, NULL);
+
} else if(event_is_action(e, ACTION_RELOAD_DATA)) {
nav_reload_current(nav);
View
47 src/prop/prop_core.c
@@ -965,6 +965,7 @@ prop_build_notify_value(prop_sub_t *s, int direct, const char *origin,
switch(p->hp_type) {
case PROP_RSTRING:
+ assert(p->hp_rstring != NULL);
n->hpn_rstring = rstr_dup(p->hp_rstring);
n->hpn_rstrtype = p->hp_rstrtype;
n->hpn_event = PROP_SET_RSTRING;
@@ -3053,33 +3054,35 @@ prop_set_int_clipping_range(prop_t *p, int min, int max)
/**
*
*/
-void
-prop_set_void_ex(prop_t *p, prop_sub_t *skipme)
+static void
+prop_set_void_exl(prop_t *p, prop_sub_t *skipme)
{
- if(p == NULL)
+ if(p->hp_type == PROP_ZOMBIE)
return;
- hts_mutex_lock(&prop_mutex);
+ if(p->hp_type != PROP_VOID) {
- if(p->hp_type == PROP_ZOMBIE) {
- hts_mutex_unlock(&prop_mutex);
- return;
+ if(prop_clean(p))
+ return;
+
+ p->hp_type = PROP_VOID;
+ prop_notify_value(p, skipme, "prop_set_void()", 0);
}
+}
- if(p->hp_type != PROP_VOID) {
- if(prop_clean(p)) {
- hts_mutex_unlock(&prop_mutex);
- return;
- }
-
- } else {
- hts_mutex_unlock(&prop_mutex);
+/**
+ *
+ */
+void
+prop_set_void_ex(prop_t *p, prop_sub_t *skipme)
+{
+ if(p == NULL)
return;
- }
- p->hp_type = PROP_VOID;
- prop_set_epilogue(skipme, p, "prop_set_void()");
+ hts_mutex_lock(&prop_mutex);
+ prop_set_void_exl(p, skipme);
+ hts_mutex_unlock(&prop_mutex);
}
@@ -3761,7 +3764,7 @@ prop_set_ex(prop_sub_t *skipme, prop_t *p, ...)
{
va_list ap;
prop_t *c = p;
- const char *n;
+ const char *n, *str;
if(p == NULL || p->hp_type == PROP_ZOMBIE)
return;
@@ -3787,7 +3790,11 @@ prop_set_ex(prop_sub_t *skipme, prop_t *p, ...)
int ev = va_arg(ap, prop_event_t);
switch(ev) {
case PROP_SET_STRING:
- prop_set_string_exl(p, skipme, va_arg(ap, const char *), PROP_STR_UTF8);
+ str = va_arg(ap, const char *);
+ if(str == NULL)
+ prop_set_void_exl(p, skipme);
+ else
+ prop_set_string_exl(p, skipme, str, PROP_STR_UTF8);
break;
case PROP_SET_INT:
prop_set_int_exl(p, skipme, va_arg(ap, int));
View
3  src/prop/prop_nodefilter.c
@@ -1203,7 +1203,6 @@ pnp_set_enable(void *opaque, int v)
return;
pnp->pnp_enabled = !!v;
-
if(nf == NULL)
return;
@@ -1227,7 +1226,7 @@ prop_nf_pred_add(struct prop_nf *nf,
pnp->pnp_path = strvec_split(path, '.');
pnp->pnp_cf = cf;
pnp->pnp_mode = mode;
-
+ pnp->pnp_nf = nf;
LIST_INSERT_HEAD(&nf->preds, pnp, pnp_link);
if(enable != NULL) {
View
2  src/ui/glw/glw_ps3.c
@@ -466,6 +466,8 @@ const static action_type_t *btn_to_action_sel[BTN_max] = {
[BTN_RIGHT] = AVEC(ACTION_MOVE_RIGHT),
[BTN_DOWN] = AVEC(ACTION_MOVE_DOWN),
[BTN_TRIANGLE] = AVEC(ACTION_SWITCH_VIEW),
+ [BTN_CIRCLE] = AVEC(ACTION_STOP),
+ [BTN_START] = AVEC(ACTION_PLAYQUEUE),
};
View
41 src/upnp/upnp_browse.c
@@ -30,7 +30,6 @@
#include "fileaccess/fileaccess.h"
-
/**
* UPNP browse request
*/
@@ -47,6 +46,7 @@ typedef struct upnp_browse {
char *ub_event_url;
prop_t *ub_page;
+ prop_t *ub_model;
prop_t *ub_nodes;
prop_t *ub_items;
prop_t *ub_loading;
@@ -89,7 +89,7 @@ static const char *
item_set_str(prop_t *c, htsmsg_t *item, const char *propname, const char *id)
{
const char *s = htsmsg_get_str_multi(item, id, "cdata", NULL);
- prop_set_string(prop_create(c, propname), s);
+ prop_set(c, propname, NULL, PROP_SET_STRING, s);
return s;
}
@@ -165,6 +165,11 @@ make_videoItem(prop_t *c, prop_t *m, htsmsg_t *item,
prop_set_string(prop_create(c, "type"), "video");
+ const char *title =
+ htsmsg_get_str_multi(item,
+ "http://purl.org/dc/elements/1.1/title",
+ "cdata", NULL);
+
item_set_str(m, item, "title", "http://purl.org/dc/elements/1.1/title");
item_set_str(m, item, "icon",
@@ -173,6 +178,8 @@ make_videoItem(prop_t *c, prop_t *m, htsmsg_t *item,
snprintf(url, sizeof(url), "%s:%s", baseurl, id);
prop_set_string(prop_create(c, "url"), url);
+
+ prop_set_string(prop_create(c, "filename"), title);
}
@@ -479,6 +486,7 @@ ub_destroy(upnp_browse_t *ub)
free(ub->ub_event_url);
prop_ref_dec(ub->ub_page);
+ prop_ref_dec(ub->ub_model);
prop_ref_dec(ub->ub_nodes);
prop_ref_dec(ub->ub_items);
prop_ref_dec(ub->ub_loading);
@@ -607,7 +615,8 @@ browse_directory(upnp_browse_t *ub)
pnf = prop_nf_create(ub->ub_nodes, ub->ub_items, ub->ub_filter,
PROP_NF_AUTODESTROY);
prop_set_int(ub->ub_canFilter, 1);
- prop_nf_release(pnf);
+
+ decorated_browse_create(ub->ub_model, pnf, ub->ub_items);
pc = prop_courier_create_waitable();
ub->ub_run = 1;
@@ -927,27 +936,27 @@ be_upnp_browse(prop_t *page, const char *url)
upnp_browse_t *ub = calloc(1, sizeof(upnp_browse_t));
ub->ub_url = strdup(url);
ub->ub_page = prop_ref_inc(page);
+ ub->ub_source = prop_create_r(ub->ub_page, "source");
- ub->ub_source = prop_ref_inc(prop_create(page, "source"));
- ub->ub_direct_close = prop_ref_inc(prop_create(page, "directClose"));
+ ub->ub_direct_close = prop_create_r(page, "directClose");
- prop_t *model = prop_create(page, "model");
+ ub->ub_model = prop_create_r(page, "model");
- ub->ub_type = prop_ref_inc(prop_create(model, "type"));
+ ub->ub_type = prop_create_r(ub->ub_model, "type");
- ub->ub_contents = prop_ref_inc(prop_create(model, "contents"));
- ub->ub_error = prop_ref_inc(prop_create(model, "error"));
- ub->ub_nodes = prop_ref_inc(prop_create(model, "nodes"));
- ub->ub_items = prop_ref_inc(prop_create(model, "items"));
- ub->ub_loading = prop_ref_inc(prop_create(model, "loading"));
+ ub->ub_contents = prop_create_r(ub->ub_model, "contents");
+ ub->ub_error = prop_create_r(ub->ub_model, "error");
+ ub->ub_nodes = prop_create_r(ub->ub_model, "nodes");
+ ub->ub_items = prop_create_r(ub->ub_model, "source");
+ ub->ub_loading = prop_create_r(ub->ub_model, "loading");
prop_set_int(ub->ub_loading, 1);
- ub->ub_filter = prop_ref_inc(prop_create(model, "filter"));
- ub->ub_canFilter = prop_ref_inc(prop_create(model, "canFilter"));
+ ub->ub_filter = prop_create_r(ub->ub_model, "filter");
+ ub->ub_canFilter = prop_create_r(ub->ub_model, "canFilter");
- prop_t *metadata = prop_create(model, "metadata");
+ prop_t *metadata = prop_create(ub->ub_model, "metadata");
- ub->ub_title = prop_ref_inc(prop_create(metadata, "title"));
+ ub->ub_title = prop_create_r(metadata, "title");
hts_thread_create_detached("upnpbrowse", upnp_browse_thread, ub,
THREAD_PRIO_LOW);
return 0;

No commit comments for this range

Something went wrong with that request. Please try again.