[PR #3188] [CLOSED] New share - if existing share, then return the item #3893

Closed
opened 2026-04-25 00:17:28 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3188
Author: @sevenlayercookie
Created: 7/22/2024
Status: Closed

Base: masterHead: master


📝 Commits (5)

  • 9b47130 modified: server/controllers/ShareController.js
  • 634298f attempt at get slug by mediaItemId
  • 748541f restore other call to original
  • a8081b9 or would it be better to return just the slug instead of the whole share object?
  • 4cdf54d doesn't need to be a public route (should go behind usual API auth)

📊 Changes

1 file changed (+31 additions, -0 deletions)

View changed files

📝 server/controllers/ShareController.js (+31 -0)

📄 Description

When attempting to create a share, currently request will fail returning “share already exists.” However, it would be more useful if the request returned the existing mediaitem, from which the requester can find the existing slug and use that instead of creating a new share.

Another option would be to create a new GET route that gets the existing share URL/slug by providing libraryitemid as parameter.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3188 **Author:** [@sevenlayercookie](https://github.com/sevenlayercookie) **Created:** 7/22/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (5) - [`9b47130`](https://github.com/advplyr/audiobookshelf/commit/9b47130febabd03dd883a6a44de9a9e127e990d5) modified: server/controllers/ShareController.js - [`634298f`](https://github.com/advplyr/audiobookshelf/commit/634298f5b7c4845e8fffc00547eeacf3cb93c599) attempt at get slug by mediaItemId - [`748541f`](https://github.com/advplyr/audiobookshelf/commit/748541fb4e0e8dcfde3c7218f664609665f6c456) restore other call to original - [`a8081b9`](https://github.com/advplyr/audiobookshelf/commit/a8081b9a74451882d4250a188cd038801f14fa25) or would it be better to return just the slug instead of the whole share object? - [`4cdf54d`](https://github.com/advplyr/audiobookshelf/commit/4cdf54d0495c6f5ced4639ae5382e759d9596beb) doesn't need to be a public route (should go behind usual API auth) ### 📊 Changes **1 file changed** (+31 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/controllers/ShareController.js` (+31 -0) </details> ### 📄 Description When attempting to create a share, currently request will fail returning “share already exists.” However, it would be more useful if the request returned the existing mediaitem, from which the requester can find the existing slug and use that instead of creating a new share. Another option would be to create a new GET route that gets the existing share URL/slug by providing libraryitemid as parameter. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:17:28 +02:00
adam closed this issue 2026-04-25 00:17:28 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3893