Giter Site home page Giter Site logo

Comments (8)

cgarz avatar cgarz commented on August 17, 2024 1

Yes I saw that thanks. I actually enabled that option since I preferred it.

Sorry I'm still being unclear, what I mean in this case is that the temp file would no longer have the <trackName>.flac format and would instead have a <GenericName>.flac format. Then after recording is done you would rename the <GenericName>.flac to <trackName>.flac

The process would be as follows:

  • SpotRec loaded with an option that enables this alternative silent track method.
  • SpotRec would then switch from using the track name for ffmpeg to using a generic name.
    (Example: SpotRec.tmp.flac)
  • SpotRec starts recording the track to SpotRec.tmp.flac
    (At this point the track is the silent track, no name is known.)
  • SpotRec sends the next track command
  • SpotRec can now get the track name, stores it for later renaming
  • Once the track is finished. Silent track begins playing again
  • SpotRec notices this. Finishes the recording
  • SpotRec then renames SpotRec.tmp.flac to <trackName>.flac
    (or whatever the user wants the format to be)
  • Then the process can repeat.

In this way entire playlists or saved track collections can be reliably recorded and will at worst contain a tiny bit of leading/trailing silence. Which is much easier to remove programatically in a batch process if needed.

from spotrec.

Bleuzen avatar Bleuzen commented on August 17, 2024

This would not work, because it is not possible for us to guess the next song.
To start a new recording, we need the song name. We can only get the current playing songs name. So SpotRec would have to wait until next song starts playing to detect it's name.
Since there is a little delay after song name detection, SpotRec goes to the beginning of the song again to not miss the first second in the recording.
Currently the only way to go to the beginning is to pause and previous. No other way we could use rn.
So this would not eliminate the need of this.
-> Would make no sense to implement.

from spotrec.

cgarz avatar cgarz commented on August 17, 2024

Ah yes that would be another issue. SpotRec would need to write to a temp file and rename once done.
Is that out of the question? If so, why?

from spotrec.

Bleuzen avatar Bleuzen commented on August 17, 2024

Not sure what it has to do with this, but to write to a temporary hidden file is already supported.
Just pass -t as argument when starting SpotRec.

from spotrec.

Bleuzen avatar Bleuzen commented on August 17, 2024

Yeah would be possible.
But not today or tomorrow, because:

  • Is this useful? How many users would benefit from it? Is it worth the time to implement? Or would it just blow the script up to much?
  • I have limited time and other projects and real life things going on, I won't do it in the near future. But it may be a good idea for some free days or a pull request.

from spotrec.

cgarz avatar cgarz commented on August 17, 2024

I understand, it is a pretty niche thing with alot of setup required. I might try to make it myself to get all my saved songs. I'm not a great programmer though so it would probably be ugly.

Any suggestions how best to do it? For example where should I put the track info query and the renaming part?

from spotrec.

Bleuzen avatar Bleuzen commented on August 17, 2024

Hi, sorry for not answering, I missed your last message somehow.
I will close this issue because nobody seems interrested in doing this. (You may still do it if you want.)

As a hint: If you want to listen to track changes, implement your code in the "playing_song_changed" method of the "Spotify" class. In this method you have acces to the new song (as shown in the log message there). You can use it to detect if it is the silent track.

from spotrec.

cgarz avatar cgarz commented on August 17, 2024

No worries I've been working on other things so didn't have a chance to try this yet anyway.

I would still like to try it though so thanks for the tip.

from spotrec.

Related Issues (18)

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.