-
Notifications
You must be signed in to change notification settings - Fork 55
Dev aviv #24
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
Open
AvivYamin
wants to merge
10
commits into
suvelocity:master
Choose a base branch
from
AvivYamin:DevAviv
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dev aviv #24
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…reverse) I created an id check function. I edited the playSong method and created a playSong function that uses all the above.
…array by its ID. I created a function that deletes a song from the playlists array by its Id. I merged these function into a function that is called removeSong which deletes a song by its ID both from the songs and playlist arrays.
…eceives parameters as the task asked and activated the randomId generator in case that the id argument was missing. My function creates an object of the arguments received and pushes it to the songs array. I also tried the constructor method for fun.
…e playlist if it exists and false if not. I edited the remove playlist to use checkPlaylistId and omits the wanted playlist from playlists.
…taken it returns -1 and if not it returns the id. I edited the createPlaylist function to generate a playlist object with a unique ID.
… if it does, the checkPlaylistID returns the playlist of that id and playPlaylist plays it songs, if it's not existent it throws an error.
…turns the boolean result. in the editPlaylist function I threw 2 Errors if the song is not in the player or the playlist does not exists, both by id. if the song does not exists in the playlist the function pushes it to the songs list of that playlist, if it does the function omits the song from the songs list of that playlist. if the specific song was the only song in the songs list the function deletes the entire playlist.
…he player. I made the function playlistDuration to check the validity of the playlist's ID and if it's valid to return the sum of all the durations of the songs in the songs list that's in the playlists array.
…the value it receives. I mad 2 functions that use the matchCheck to push the matching songs and playlists to a new arrays and sorts them alphanumerically. The main function uses all of the above to create an object with the resulted arrays.
…e between the song duration and the wanted duration. I created a function that receives a durations array and returns the duration with the smallest difference. I created 2 functions that receives a song/playlist duration and returns the song/playlist. The main function uses all above and determents which song/playlist is the closest to the given duration and returns it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.