Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MiniDLNA Doesn't seem to send events #30

Open
charlesaugust44 opened this issue Jul 4, 2024 · 0 comments
Open

MiniDLNA Doesn't seem to send events #30

charlesaugust44 opened this issue Jul 4, 2024 · 0 comments

Comments

@charlesaugust44
Copy link

I'm sorry if this is not a thing that is implemented, i tried to read the code, but my C skills are limited.

I'm using the following node code to try subscribe to ContentDirectory events, specifically the SystemUpdateID event:

import UPnPClient from "node-upnp";
import EventEmitter from "events";

EventEmitter.defaultMaxListeners = 50;

const UPNP_SERVICE_ID_CONTENT = 'urn:upnp-org:serviceId:ContentDirectory';

const dlnaBaseUrl = "http://192.168.2.104:8200";

const DlnaClient = new UPnPClient({
    url: dlnaBaseUrl + '/rootDesc.xml'
});

try {
    DlnaClient.subscribe(UPNP_SERVICE_ID_CONTENT, e => {
        console.log("LISTENER", JSON.stringify(e, null, 2));
    });

} catch (error) {
    console.error("Error during subscription:", error);
}

at the begning of the script it readly receives this two events:

{ name: [ 'TransferIDs', '' ], value: undefined }
{ name: [ 'SystemUpdateID', 9 ], value: undefined }

But even if I move/add/remove files it won't emit any other event for ContentDirectory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant