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

Manual Compilation #11

Open
miraclx opened this issue Dec 20, 2020 · 6 comments
Open

Manual Compilation #11

miraclx opened this issue Dec 20, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@miraclx
Copy link
Owner

miraclx commented Dec 20, 2020

Sometimes, freyr's internal logic for identifying sources across services fails, and track(s) affected can't be downloaded.

We should provide a means for manual intervention.

Where a user could manually identify the source and provider URIs that freyr can thereafter compile a track from.

We can do this by introducing a new subcommand - make

freyr make <URI> --source youtube:URI

For example:

freyr make spotify:track:54bFM56PmE4YLRnqpW6Tha --source youtube:oDn4eKyhSH4

  • Get track metadata from URI
  • Get audio from the source
  • Process audio with the metadata
@miraclx miraclx added the enhancement New feature or request label Dec 20, 2020
@miraclx
Copy link
Owner Author

miraclx commented Dec 20, 2020

An alternative to this would be to add a new flag to the get subcommand:

-M, --source-map <SPEC>

Where SPEC is a comma-separated list of rules that define default sources for URIs.

For example, if the rules were partitioned by |

freyr spotify:album:7v0KN0VlHJZrhAbSbxEZvZ -M "spotify:track:2ouNoo43UNurALLYLCapJv|youtube:1lgSYfxmwoQ"

Tells freyr to download the album and to use a custom source for a track in the album

@miraclx miraclx mentioned this issue Jan 2, 2021
@Godslovelee
Copy link

yeah, a good deal of advantage would be for anyone to easily manually compile any track in case one doesnt like the sound of a particular song or just being able to add an alternative version of a song to the album would be cool

@miraclx
Copy link
Owner Author

miraclx commented Feb 9, 2022

So, It's been a minute, and one more issue – #103.

Looking at this now, I don't particularly like the -M, --source-maps idea. However, we can consider using a JSON-formatted file that define track ⇿ source overrides.

Now, there are two approaches to this;

  1. We introduce a --track-map <file> / --source-map <file> that links to a JSON-formatted file in the following format;

    {
      // <service>: { <track id>: <source uri/url> }
      "spotify": {
        // Track: `spotify:track:2ouNoo43UNurALLYLCapJv`
        // Override URL: `https://www.youtube.com/watch?v=1lgSYfxmwoQ`
        "2ouNoo43UNurALLYLCapJv": "https://www.youtube.com/watch?v=1lgSYfxmwoQ"
      },
    
      // <track uri/url>: <source uri/url>
      "spotify:track:2ouNoo43UNurALLYLCapJv": "https://www.youtube.com/watch?v=1lgSYfxmwoQ",
      "https://open.spotify.com/track/2ouNoo43UNurALLYLCapJv": "youtube:1lgSYfxmwoQ"
    }
  2. We introduce a new sub-command – override that allows the user to override sources with either of the following options;

    • Single track overrides.
      $ freyr override spotify:track:2ouNoo43UNurALLYLCapJv https://www.youtube.com/watch?v=1lgSYfxmwoQ
    • Loading a JSON-formatted track map of overrides in the format defined above.
      $ freyr override -i <file>

    All overrides would then be stored globally to be reused whenever.

I think my personal preference is leaning towards #2.

@miraclx miraclx added the help wanted Extra attention is needed label Feb 9, 2022
@miraclx
Copy link
Owner Author

miraclx commented Feb 9, 2022

Tagging this "help wanted" so hopefully someone steps up to take this up. Unfortunately, I don't have as much free time to work on this. But I've prioritized it so maybe sometime soon.

@Leezan-1
Copy link

Leezan-1 commented Feb 9, 2024

Sometimes, freyr's internal logic for identifying sources across services fails, and track(s) affected can't be downloaded.

We should provide a means for manual intervention.

Where a user could manually identify the source and provider URIs that freyr can thereafter compile a track from.

We can do this by introducing a new subcommand - make

freyr make --source youtube:URI

For example:

freyr make spotify:track:54bFM56PmE4YLRnqpW6Tha --source youtube:oDn4eKyhSH4

  • Get track metadata from URI
  • Get audio from the source
  • Process audio with the metadata

Does this work? it ask for '--sources'. doesnt work with '---source'.
freyr make -d /run/media/leezannn/.../... spotify:track:08DPqTowtGwpuUVuxRsO53 --source youtube:wvm3wKXAgtE

output:
error: unknown option '--source'
(Did you mean --sources?)

@miraclx
Copy link
Owner Author

miraclx commented Feb 14, 2024

@Leezan-1, this hasn't been implemented just yet, unfortunately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants