001-1.1.6-0009-Samsung-bookmarking-fix-for-magic-containers.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. From cae3e880d26ba7671b59ac4fe44c499b6a0a9d4e Mon Sep 17 00:00:00 2001
  2. From: Eduardo Rocha <folhabranca@gmail.com>
  3. Date: Sun, 14 Sep 2014 13:45:11 -0300
  4. Subject: [PATCH] Samsung bookmarking: fix for magic containers
  5. ---
  6. upnpsoap.c | 7 +++++--
  7. 1 file changed, 5 insertions(+), 2 deletions(-)
  8. diff --git a/upnpsoap.c b/upnpsoap.c
  9. index 96ad2d5..4f6f22e 100644
  10. --- a/upnpsoap.c
  11. +++ b/upnpsoap.c
  12. @@ -1927,11 +1927,14 @@ SamsungSetBookmark(struct upnphttp * h, const char * action)
  13. if( ObjectID && PosSecond )
  14. {
  15. int ret;
  16. + const char *rid = ObjectID;
  17. +
  18. + in_magic_container(ObjectID, 0, &rid);
  19. ret = sql_exec(db, "INSERT OR REPLACE into BOOKMARKS"
  20. " VALUES "
  21. - "((select DETAIL_ID from OBJECTS where OBJECT_ID = '%q'), %q)", ObjectID, PosSecond);
  22. + "((select DETAIL_ID from OBJECTS where OBJECT_ID = '%q'), %q)", rid, PosSecond);
  23. if( ret != SQLITE_OK )
  24. - DPRINTF(E_WARN, L_METADATA, "Error setting bookmark %s on ObjectID='%s'\n", PosSecond, ObjectID);
  25. + DPRINTF(E_WARN, L_METADATA, "Error setting bookmark %s on ObjectID='%s'\n", PosSecond, rid);
  26. BuildSendAndCloseSoapResp(h, resp, sizeof(resp)-1);
  27. }
  28. else
  29. --
  30. 2.11.0