mirror of
https://git.code.sf.net/p/minidlna/git
synced 2025-03-30 04:08:05 +00:00
clients: Fix bookmarks on Samsung Q series
Add flag for milliseconds conversion for bookmarks and model for Samsung Q series, which needs this. This allows for bookmark synchronization when 2 or more TVs are using the same DLNA server.
This commit is contained in:
committed by
Justin Maggard
parent
799e6cf505
commit
ca6dbba183
@ -81,6 +81,15 @@ struct client_type_s client_types[] =
|
||||
EUserAgent
|
||||
},
|
||||
|
||||
/* Samsung Series [Q] TVs work wit milliseconds for bookmarks */
|
||||
/* User-Agent: DLNADOC/1.50 SEC_HHP_[TV] Samsung Q7 Series (49)/1.0 */
|
||||
{ ESamsungSeriesQ,
|
||||
FLAG_SAMSUNG | FLAG_DLNA | FLAG_NO_RESIZE | FLAG_SAMSUNG_DCM10 | FLAG_CAPTION_RES | FLAG_CONVERT_MS,
|
||||
"Samsung Series [Q]",
|
||||
"SEC_HHP_[TV] Samsung Q",
|
||||
EUserAgent
|
||||
},
|
||||
|
||||
/* User-Agent: DLNADOC/1.50 SEC_HHP_[TV]UE40D7000/1.0 */
|
||||
/* User-Agent: DLNADOC/1.50 SEC_HHP_ Family TV/1.0 */
|
||||
/* USER-AGENT: DLNADOC/1.50 SEC_HHP_[TV] UE65JU7000/1.0 UPnP/1.0 */
|
||||
|
@ -38,6 +38,7 @@
|
||||
#define FLAG_FORCE_SORT 0x00000800
|
||||
#define FLAG_CAPTION_RES 0x00001000
|
||||
#define FLAG_SKIP_DLNA_PN 0x00002000 /* during browsing */
|
||||
#define FLAG_CONVERT_MS 0x00004000 /* convert ms to s */
|
||||
/* Response-related flags */
|
||||
#define FLAG_HAS_CAPTIONS 0x80000000
|
||||
#define RESPONSE_FLAGS 0xF0000000
|
||||
@ -69,6 +70,7 @@ enum client_types {
|
||||
ESamsungSeriesA,
|
||||
ESamsungSeriesB,
|
||||
ESamsungSeriesCDEBDP,
|
||||
ESamsungSeriesQ,
|
||||
ESamsungSeriesCDE,
|
||||
ESamsungBDJ5500,
|
||||
ESonyBDP,
|
||||
|
10
upnpsoap.c
10
upnpsoap.c
@ -1023,6 +1023,9 @@ callback(void *args, int argc, char **argv, char **azColName)
|
||||
** so HH:MM:SS. But Kodi seems to be the only user of this tag, and it only works with a
|
||||
** raw seconds value.
|
||||
** If Kodi gets fixed, we can use duration_str(sec * 1000) here */
|
||||
if( passed_args->flags & FLAG_CONVERT_MS ) {
|
||||
sec *= 1000;
|
||||
}
|
||||
if( passed_args->filter & FILTER_UPNP_LASTPLAYBACKPOSITION )
|
||||
ret = strcatf(str, "<upnp:lastPlaybackPosition>%d</upnp:lastPlaybackPosition>",
|
||||
sec);
|
||||
@ -2119,7 +2122,11 @@ static void UpdateObject(struct upnphttp * h, const char * action)
|
||||
}
|
||||
else if (strcmp(tag, "upnp:lastPlaybackPosition") == 0)
|
||||
{
|
||||
|
||||
int sec = duration_sec(new);
|
||||
if( h->req_client && (h->req_client->type->flags & FLAG_CONVERT_MS) ) {
|
||||
sec /= 1000;
|
||||
}
|
||||
if (sec < 30)
|
||||
sec = 0;
|
||||
else
|
||||
@ -2216,6 +2223,9 @@ SamsungSetBookmark(struct upnphttp * h, const char * action)
|
||||
in_magic_container(ObjectID, 0, &rid);
|
||||
detailID = sql_get_int64_field(db, "SELECT DETAIL_ID from OBJECTS where OBJECT_ID = '%q'", rid);
|
||||
|
||||
if( h->req_client && (h->req_client->type->flags & FLAG_CONVERT_MS) ) {
|
||||
sec /= 1000;
|
||||
}
|
||||
if ( sec < 30 )
|
||||
sec = 0;
|
||||
ret = sql_exec(db, "INSERT OR IGNORE into BOOKMARKS (ID, SEC)"
|
||||
|
Reference in New Issue
Block a user