MusicBot icon indicating copy to clipboard operation
MusicBot copied to clipboard

Add seek command (supersedes #344)

Open MichailiK opened this issue 4 years ago • 12 comments

This pull request...

  • [ ] Fixes a bug
  • [x] Introduces a new feature
  • [ ] Improves an existing feature
  • [ ] Boosts code quality or performance

Description

Allows DJs and user that added the track to perform a seek on a playing track

Purpose

Example: Going to a specific timestamp in a song compilation.

Relevant Issue(s)

This PR supersedes PR #344, as the author whew-inc stated that they will no longer be working on their pull request, I have decided to pick up on it

Currently, I am working on the change requests in #344.

  • [x] starting a song at a specific time (both via the play command as well as in playlists; youtube has a format for this and jmusicbot should probably adapt that same format)

And, because YouTube's time parameter can either be just seconds or 1h2m3s

MichailiK avatar Apr 12 '21 07:04 MichailiK

@jagrosh could you elaborate regarding

starting a song at a specific time (both via the play command as well as in playlists; youtube has a format for this and jmusicbot should probably adapt that same format)

I know that YouTube has a t url parameter for time with either just seconds (for example 70) or something like 1m10s, but playlists? Could you elaborate?

MichailiK avatar Apr 12 '21 10:04 MichailiK

playlists urls can contain on what entry playback should begin with time parameter, afaik. Example: https://www.youtube.com/watch?v=djV11Xbc914&list=RDdQw4w9WgXcQ&index=5&t=60 v = video id list = playlist id index = index of v in list, 1 based t = timestamp of the video

Edit: index 1 is the rickroll and the playlist is a youtube mix

Sanduhr32 avatar Apr 12 '21 10:04 Sanduhr32

yes, i know that t is the timestamp for the video, but timestamps for playlists?

MichailiK avatar Apr 12 '21 12:04 MichailiK

have you looked at my comment in detail?

Sanduhr32 avatar Apr 12 '21 13:04 Sanduhr32

@jagrosh could you elaborate regarding

starting a song at a specific time (both via the play command as well as in playlists; youtube has a format for this and jmusicbot should probably adapt that same format)

I know that YouTube has a t url parameter for time with either just seconds (for example 70) or something like 1m10s, but playlists? Could you elaborate?

What I meant by this is that if a youtube (or other) link has a specified start time, then we should start the track there, including when that link is found within a local (jmusicbot) playlist.

This may mean that we need to store more metadata in our queued tracks (right now we store the user id of the person who requested it, but we'll also want to store starting timestamp, possibly ending timestamp).

jagrosh avatar May 12 '21 17:05 jagrosh

Due to unresolvable dependencies in dead maven repositories, as well as no longer having these dependencies in my cache, it has become increasingly difficult to contribute to MusicBot. I may open this pull request again, once the dead repositories have been replaced & all dependencies can be downloaded again.

MichailiK avatar Sep 07 '21 16:09 MichailiK

Elaborate this further. Maybe i can help with this "dead repo & unresovable dependencies" issue.

<repository>
    <id>dv8tion</id>
    <name>m2-dv8tion</name>
    <url>https://m2.dv8tion.net/releases</url>
</repository>

for example.

Sanduhr32 avatar Sep 08 '21 13:09 Sanduhr32

~~As of writing, the jcenter.bintray.com repository is unavailable, which houses lavaplayer-natives-extra and JLyrics. App Veyor's logs match with mine:~~

Maven output
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< com.jagrosh:JMusicBot >------------------------
[INFO] Building JMusicBot Snapshot
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom (8.1 kB at 17 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/23/maven-plugins-23.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/23/maven-plugins-23.pom (9.2 kB at 135 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/22/maven-parent-22.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/22/maven-parent-22.pom (30 kB at 313 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/apache/11/apache-11.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/apache/11/apache-11.pom (15 kB at 221 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.jar (30 kB at 304 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom (10 kB at 134 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/24/maven-plugins-24.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/24/maven-plugins-24.pom (11 kB at 69 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/23/maven-parent-23.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/23/maven-parent-23.pom (33 kB at 582 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar (43 kB at 537 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom (10 kB at 109 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.12.4/surefire-2.12.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.12.4/surefire-2.12.4.pom (14 kB at 212 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar (30 kB at 350 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom (5.8 kB at 77 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom (13 kB at 163 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/21/maven-parent-21.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/21/maven-parent-21.pom (26 kB at 342 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/apache/10/apache-10.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/apache/10/apache-10.pom (15 kB at 200 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.jar (34 kB at 382 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-shade-plugin/1.5/maven-shade-plugin-1.5.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-shade-plugin/1.5/maven-shade-plugin-1.5.pom (5.9 kB at 98 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-shade-plugin/1.5/maven-shade-plugin-1.5.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-shade-plugin/1.5/maven-shade-plugin-1.5.jar (83 kB at 648 kB/s)
Downloading from bintray-sedmelluq-com.sedmelluq: https://dl.bintray.com/sedmelluq/com.sedmelluq/com/sedmelluq/lavaplayer-natives-extra/1.3.13/lavaplayer-natives-extra-1.3.13.pom
Downloading from bintray-sedmelluq-com.sedmelluq: https://dl.bintray.com/sedmelluq/com.sedmelluq/com/jagrosh/JLyrics/0.5/JLyrics-0.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.259 s
[INFO] Finished at: 2021-09-08T20:04:18+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project JMusicBot: Could not resolve dependencies for project com.jagrosh:JMusicBot:jar:Snapshot: Failed to collect dependencies at com.sedmelluq:lavaplayer-natives-extra:jar:1.3.13: Failed to read artifact descriptor for com.sedmelluq:lavaplayer-natives-extra:jar:1.3.13: Could not transfer artifact com.sedmelluq:lavaplayer-natives-extra:pom:1.3.13 from/to bintray-sedmelluq-com.sedmelluq (https://dl.bintray.com/sedmelluq/com.sedmelluq): Authorization failed for https://dl.bintray.com/sedmelluq/com.sedmelluq/com/sedmelluq/lavaplayer-natives-extra/1.3.13/lavaplayer-natives-extra-1.3.13.pom 403 Forbidden -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

The dependency issues have been resolved now.

MichailiK avatar Sep 08 '21 18:09 MichailiK

What still needs to be done before this can be merged?

Minenash avatar Oct 29 '21 16:10 Minenash

I'd also like to know what else we need for this to be working

antaxiom avatar Dec 16 '21 22:12 antaxiom

Still waiting for this to be merged.

n-tdi avatar Jul 01 '23 03:07 n-tdi

@jagrosh will this be merged?

rojosinalma avatar Jul 12 '23 01:07 rojosinalma