Hallo,
ich beschäftige mich gerade mit der Aufnahmeliste und dem restfulapi Plugin. Die Idee des sync-Files finde ich gut, allerdings verstehe ich das beobachtete Verhalten in keinster Weise.
Ich rufe immer wieder recordings/update mit einer SyncId auf:
curl "http://192.168.1.1:8002/recordings/updates.json?syncId=68CE1D58-BF0E-446F-BCE7-4B1F21EFFEEFA-27"
Die Log-Ausgabe des Plugins ist allerdings nicht-deterministisch. Trotz intensiver Suche kann ich einfach nicht erkennen, was im Plugin nicht funktioniert. Nach jedem - identischem - Aufruf habe ich eine Leerzeile eingefügt:
Oct 12 17:28:57 server vdr: [13316] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:28:57 server vdr: [13316] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:28:57 server vdr: [13316] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:28:57 server vdr: [13316] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:28:57 server vdr: [13316] restfulapi: could not open sync map file @�#026�z for writing!
Oct 12 17:28:57 server vdr: [13316] restfulapi: recording updates: 0
Oct 12 17:29:24 server vdr: [13313] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:29:24 server vdr: [13313] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:29:24 server vdr: [13313] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:29:24 server vdr: [13313] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:29:24 server vdr: [13313] restfulapi: could not open sync map file #020�%�z for writing!
Oct 12 17:29:24 server vdr: [13313] restfulapi: recording updates: 0
Oct 12 17:30:09 server vdr: [13314] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:09 server vdr: [13314] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:09 server vdr: [13314] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:09 server vdr: [13314] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:09 server vdr: [13314] restfulapi: sync map file '/vdr/cache/vdr1/plugins/restfulapi/sync/68CE1D58-BF0E-446F-BCE7-4B1F21EFFEEFA-27' written with 753 entries
Oct 12 17:30:09 server vdr: [13314] restfulapi: recording updates: 0
Oct 12 17:30:19 server vdr: [13312] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:19 server vdr: [13312] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:19 server vdr: [13312] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:19 server vdr: [13312] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:19 server vdr: [13312] restfulapi: could not open sync map file ��=,{ for writing!
Oct 12 17:30:19 server vdr: [13312] restfulapi: recording updates: 0
Oct 12 17:30:23 server vdr: [13315] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:23 server vdr: [13315] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:23 server vdr: [13315] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:23 server vdr: [13315] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:23 server vdr: [13315] restfulapi: could not open sync map file н!�z for writing!
Oct 12 17:30:23 server vdr: [13315] restfulapi: recording updates: 0
Oct 12 17:30:26 server vdr: [13317] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:26 server vdr: [13317] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:26 server vdr: [13317] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:26 server vdr: [13317] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:26 server vdr: [13317] restfulapi: could not open sync map file �$#031�z for writing!
Oct 12 17:30:26 server vdr: [13317] restfulapi: recording updates: 0
Oct 12 17:30:29 server vdr: [13316] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:29 server vdr: [13316] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:29 server vdr: [13316] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:29 server vdr: [13316] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:30:29 server vdr: [13316] restfulapi: could not open sync map file p�"�z for writing!
Oct 12 17:30:29 server vdr: [13316] restfulapi: recording updates: 0
Oct 12 17:31:10 server vdr: [13313] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:10 server vdr: [13313] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:10 server vdr: [13313] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:10 server vdr: [13313] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:10 server vdr: [13313] restfulapi: sync map file '/vdr/cache/vdr1/plugins/restfulapi/sync/68CE1D58-BF0E-446F-BCE7-4B1F21EFFEEFA-27' written with 753 entries
Oct 12 17:31:10 server vdr: [13313] restfulapi: recording updates: 0
Oct 12 17:31:26 server vdr: [13314] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:26 server vdr: [13314] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:26 server vdr: [13314] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:26 server vdr: [13314] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:26 server vdr: [13314] restfulapi: sync map file '/vdr/cache/vdr1/plugins/restfulapi/sync/68CE1D58-BF0E-446F-BCE7-4B1F21EFFEEFA-27' written with 753 entries
Oct 12 17:31:26 server vdr: [13314] restfulapi: recording updates: 0
Oct 12 17:31:31 server vdr: [13312] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:31 server vdr: [13312] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:31 server vdr: [13312] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:31 server vdr: [13312] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:31:31 server vdr: [13312] restfulapi: could not open sync map file �',{ for writing!
Oct 12 17:31:31 server vdr: [13312] restfulapi: recording updates: 0
Oct 12 17:33:56 server vdr: [13315] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:33:56 server vdr: [13315] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:33:56 server vdr: [13315] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:33:56 server vdr: [13315] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:33:56 server vdr: [13315] restfulapi: sync map file '/vdr/cache/vdr1/plugins/restfulapi/sync/68CE1D58-BF0E-446F-BCE7-4B1F21EFFEEFA-27' written with 753 entries
Oct 12 17:33:56 server vdr: [13315] restfulapi: recording updates: 0
Oct 12 17:34:01 server vdr: [13317] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:34:01 server vdr: [13317] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:34:01 server vdr: [13317] restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:34:01 server vdr: [13317] restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
Oct 12 17:34:01 server vdr: [13317] restfulapi: could not open sync map file @�#023�z for writing!
Oct 12 17:34:01 server vdr: [13317] restfulapi: recording updates: 0
Die doppelten Einträge
restfulapi: FileExtension: requested path /vdr/cache/vdr1/plugins/restfulapi/sync
restfulapi: FileExtension: realpath /vdr/cache/vdr1/plugins/restfulapi/sync
scheinen beim laden und speichern der syncMap erzeugt zu werden.
Aber warum scheint der Filename eher zufällig richtig zu sein?
const char* fileName = (cacheDir + "/" + this->id).c_str();
FILE* fp = fopen(fileName, write ? "w" : "r");
if ( fp == NULL ) {
esyslog("restfulapi: could not open sync map file %s for %s!", fileName, write ? "writing" : "reading");
}
Zabrimus