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

[ FEATURE ] Allow custom show folder names when adding shows with API #3308

Closed
devster31 opened this issue Nov 25, 2017 · 3 comments
Closed

Comments

@devster31
Copy link

Before submitting your issue:

Enable debug logging in Medusa settings, reproduce the error (be sure to disable after the bug is fixed)

Branch/Commit: master / b16e0e5eb4ded727eebd2ab2cd9683ab597662f5
Version: v0.1.17
Database: 45.1
OS: Linux-4.9.35-v7+-armv7l
What you did:

$ http(ie) :8081/api/v1/${MEDUSA_API_KEY}/ cmd=='show.addnew' indexerid==281630 tvdbid==281630 location=='/downloads/antares/Media/TV Shows/Scorpion (2014)/'

What happened:

HTTP/1.1 200 OK
Content-Length: 124
Content-Type: application/json;charset=UTF-8
Date: Fri, 24 Nov 2017 23:54:01 GMT
Etag: "4a54baa346fb2a8c1d5d905d04abf18b32f9a3cf"
Server: TornadoServer/4.5.2
Vary: Accept-Encoding

{
    "data": {},
    "message": "'/downloads/antares/Media/TV Shows/Scorpion (2014)/' is not a valid location",
    "result": "failure"
}

What you expected: Since this is actually a new show I expected the path to be created and the show to be added to the database, I believe the culprit are the lines below.

if not os.path.isdir(self.location):
return _responds(RESULT_FAILURE, msg='{0!r} is not a valid location'.format(self.location))

@labrys
Copy link
Contributor

labrys commented Nov 25, 2017

The problem here is the description in the API. The location should be the root directory, not the actual show's folder and should already exist. If left blank, it will use your default root directory. The show's sub-folder will be created in this root directory based on naming rules. For example if your series normally reside in /downloads/antares/Media/TV Shows and that folder exists, it should then create the Scorpion (2014) subfolder within it. The API Builder documentation should probably clarify that.

@devster31
Copy link
Author

Just a personal clarification.
From the web interface it's not possible to customize the show folder name (in this case it would be just Scorpion, while in the case of Castle it would be Castle (2009) [this are the names on TheTVDB]. Is this operation possible with the API or will it be?

@labrys labrys changed the title [API v1] show.addnew fails for any path [ FEATURE ] Allow custom show folder names when adding shows with API Nov 25, 2017
@labrys
Copy link
Contributor

labrys commented Dec 9, 2017

Closing this as it has been added to the #282 Master Feature List to track all feature requests. Discussion specific to this feature can continue in this thread.

@labrys labrys closed this as completed Dec 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants