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

Dealing with duplicate filenames #7

Open
musjj opened this issue Nov 18, 2020 · 2 comments
Open

Dealing with duplicate filenames #7

musjj opened this issue Nov 18, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@musjj
Copy link

musjj commented Nov 18, 2020

How does your tool currently deal with scripts sharing the same filename?
So for example, if the following repos exist:
https://github.com/foo/bar
https://github.com/foo1/bar
and they both contain bar.lua, how does your script resolve this issue when installing them to the user's mpv scripts directory?

@Nudin
Copy link
Owner

Nudin commented Jan 23, 2021

Good point! This currently would result in an error. This could be fixed by renaming the files to contain the plugin id (for example pluginid-originafilename).

@Nudin Nudin added the enhancement New feature or request label Jan 23, 2021
@Koopzington
Copy link

According to the mpv docs it also supports scripts located in a subfolder inside the scripts folder if they have a main.x inside them.

To deal with vendor-prefixing i'd suggest:

  1. creating folder names along the lines of platform-username-reponame
  2. check downloaded contents
    1. in case of a single script, rename it to main.{ext} and copy it into the folder
    2. in case of an existing main.{ext} file, copy all contents into the folder

Due to my lack of overall knowledge about mpv plugins though i don't know if this might break intercompatibility between separate scripts though.

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

No branches or pull requests

3 participants