Git Product home page Git Product logo

Comments (19)

kwent avatar kwent commented on June 5, 2024 1

@davidmatas I just released a new 2.0.0 version which support 5.x and 6.xversion ! Give it a shot !

from syno.

kwent avatar kwent commented on June 5, 2024 1

Not really. I will try to do a minor update soon to support it.

from syno.

kwent avatar kwent commented on June 5, 2024 1

Hi @davidmatas.

Well i haven't had the time to implements stream support. PR is highly encouraged.

from syno.

kwent avatar kwent commented on June 5, 2024

@devnore Do you have an idea of what is broken of what api you would like to add ?

from syno.

kwent avatar kwent commented on June 5, 2024

Actually i know what changed. I will release a 2.0 version soon which will support DSM 5.2 and DSM 6.0

from syno.

devnore avatar devnore commented on June 5, 2024

Wonderful, have not had the time to answer your question.

Seams like default entrypoint is entry.cgi

and another thing seams to be that some arguments have changed.

example
SYNO.FileStation.CreateFolder
method: create
parameter: Name

One or more new folder names, separated by commas “,” and around brackets. The number of
names must be the same as the number of folder paths in the folder_path parameter. The first
name parameter corresponding to the first folder_path parameter.

from syno.

davidmatas avatar davidmatas commented on June 5, 2024

Any news here? Do you need help?

from syno.

kwent avatar kwent commented on June 5, 2024

Sorry guys, i began a 2.0 branch here https://github.com/kwent/syno/commits/2.0.

Did not had time to polish and release a new version yet. But that should already work with DSM 6.0.

Will try to finish, polish and release asap.

BTW. If you guys are on DSM 5.2 still let me know, i need your help for some api files i need to get. (cc @devnore @davidmatas )

from syno.

davidmatas avatar davidmatas commented on June 5, 2024

I jumped to DSM 6.0 a few weeks ago, sorry :(

from syno.

davidmatas avatar davidmatas commented on June 5, 2024

@kwent I'm having problems with the 2.0 branch:

  1. The path to definitions/" + this.apiVersion + "/compiled/full.json is not available. It works using fs.readFileSync(path.join(__dirname, "../definitions/" + this.apiVersion + "/compiled/full.json"), 'utf8'))
Error: ENOENT: no such file or directory, open 'definitions/6.0/compiled/full.json'
    at Error (native)
  1. I am using syno.fs.download but it doesn't work with new API. I'm getting the following error:
/node_modules/syno/dist/syno.js:78
                        code = body.error ? body.error.code : body.data[0].error;
                                                                       ^
TypeError: Cannot read property '0' of undefined

I'm trying to download photograps and when inspect the response/body I see the binary data, so I think it is fine but the file stores empty

from syno.

kwent avatar kwent commented on June 5, 2024

@davidmatas Nevermind 2.0 is probably broken and still need to be finished. It's taking a long time cause i redid all the engine and it's a lot of changes to support all api versions.

from syno.

davidmatas avatar davidmatas commented on June 5, 2024

Great! just wanted provide some weird things I've seen. Thanks for your work

from syno.

davidmatas avatar davidmatas commented on June 5, 2024

@kwent The problem with syno.fs.download continues.

/node_modules/syno/dist/syno.js:78
                        code = body.error ? body.error.code : body.data[0].error;
                                                                       ^
TypeError: Cannot read property '0' of undefined

Maybe the writable stream needed for download is not been managed correctly? If I inspect the body I see all the binary data

from syno.

kwent avatar kwent commented on June 5, 2024

@davidmatas Do you use the CLI or the JS API directly ?

from syno.

davidmatas avatar davidmatas commented on June 5, 2024

The JS api.

syno.fs.download({
  path: file,
  stream: fs.createWriteStream(year + '/' + path.basename(file)),
  mode: 'open'
}, function(err, data){
  console.log(err, data);
});

from syno.

kwent avatar kwent commented on June 5, 2024

Oh nice. yeah stream are not supported for now. I need to find a clean way to detect you passed a stream in the parameters.

from syno.

davidmatas avatar davidmatas commented on June 5, 2024

So is there any way to get work fs.download for now?

from syno.

davidmatas avatar davidmatas commented on June 5, 2024

Any news about the stream support?

from syno.

davidmatas avatar davidmatas commented on June 5, 2024

@kwent ping

from syno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.