GithubHelp home page GithubHelp logo

Manual Compilation about freyr-js HOT 6 OPEN

miraclx avatar miraclx commented on May 14, 2024
Manual Compilation

from freyr-js.

Comments (6)

Godslovelee avatar Godslovelee commented on May 14, 2024 1

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

from freyr-js.

miraclx avatar miraclx commented on May 14, 2024

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

from freyr-js.

miraclx avatar miraclx commented on May 14, 2024

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.

from freyr-js.

miraclx avatar miraclx commented on May 14, 2024

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.

from freyr-js.

Leezan-1 avatar Leezan-1 commented on May 14, 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?)

from freyr-js.

miraclx avatar miraclx commented on May 14, 2024

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

from freyr-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.