nixgates / plugin.video.seren

Repository for Seren Development
315 stars 98 forks source link

[BUG] Premiumize API error could not get folder.id #715

Closed nki2bpz closed 3 years ago

nki2bpz commented 3 years ago

Describe the bug When trying to access the premiumize folder under seren/files/premiumize I get a Premiumize API error : could not get folder id A clear and concise description of what the bug is. I believe in late October , Premiumize updated the API in the way they handle directory structure.

I cane across this txt file on their website which seeks to be relevant but I can not confirm a date for this file

"Premiumize.me V3 API Migration guide"

Our Folder list API responded with a list of items that have attributes and a type. Until now the only 2 types in use have been "folder" and "torrent". To view the content of a torrent there has been a separate API.

This will change.

Now, we have another type in the list, called "file".

An example response with all 3 types would look like this:

{ "status":"success", "content":[ { "id":"31370", "name":"my folder", "type":"folder" }, { "id":"6917290", "hash":"f53bde50d2d92f59c93da32738bb3a2ae982f232", "size":"648821252", "name":"torret name", "created_at":"1504855978", "type":"torrent" }, { "id":"6Z2-C4dOqF8Uabvacs5ATA", "size":262721045, "name":"file.mkv", "created_at":1511253471, "type":"file", "link":"https:\/\/server.com\/dl\/file.mkv", "stream_link":false } ] }

All IDs always have been strings, but numeric. Now they will become alphanumeric. So you need to make sure you store them in string variables and not integers.

Please make sure your addon displays the new "file" type items correctly to the user.

Torrents will be included in the folder list as file items and the "torrent" type will be eventually removed alltogether.

The API documentation of all updated methods can be found here: https://www.premiumize.me/static/api/cloud.html

To test your addon, please go to: https://www.premiumize.me/files?upload=true

A new button will appear in the file manager, that allows you to upload test files.

Also the /api/folder/paste method has changed to accept two arrays of IDs (files and folders) instead of one multidimensional array with id and type.

The old version is still working but will removed eventually, please make sure you upgrade to the new version.

If you have any questions, please contact us.

Log

Please attach or link to and uploaded log file here. Log files are required, and debug logs are preferable. See the Kodi wiki for information on how to get a log file.

To Reproduce Click Seren/My Files/Premiumize Steps to reproduce the behavior, for example:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Environment

Screenshots and Additional Context

If applicable, add any other context or screenshots about the problem here.

nki2bpz commented 3 years ago

Most recent update fixed this issue. Thank you for all the free time you put in to this add on. I hope you have a great holiday season. Closing