Code Monkey home page Code Monkey logo

spotishell's Introduction

Hello Internet!

I'm wardbox.

spotishell's People

Contributors

awsles avatar cryppy avatar domochip avatar kimipsen avatar natfan avatar wardbox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spotishell's Issues

Set-PlaylistItems not working as expected with more than 100 tracks

Describe the bug
When using Set-PlaylistItems with more than 100 tracks to add, the playlist only contains the last batch.

To Reproduce
Steps to reproduce the behavior:

  1. Create a playlist
  2. Add 120 tracks with Set-PlaylistItems
  3. Only 20 tracks will be on the playlist

Expected behavior
All tracks should be in the playlist

Desktop (please complete the following information):

  • OS: Windows 10
  • Powershell Version : 5.1

Minimum version of the PowerShell

Lot of functions uses $IsWindows, $IsMacOS and $IsLinux.
Those are shipped with PowerShell Core 6 and PowerShell 7

The psd1 file indicates:

# Minimum version of the Windows PowerShell engine required by this module
    PowerShellVersion = '5.0'

and then on a Powershell 5.1, the code bellow do anything, because all $Is... are $null and no browser opens up :

if ($IsMacOS) {
    # opens the constructed uri in default browser on mac
    Write-Verbose "We are on Mac OS"
    open $URI
  } elseif ($IsWindows) {
    Write-Verbose "We are on Windows"
    rundll32 url.dll,FileProtocolHandler $URI
  }

Search-Spotify Throwing 401

PS C:\Users\maximla\Documents> Search-Spotify -Query "Bloc Party" -Artist
Invoke-WebRequest : {
  "error": {
    "status": 401,
    "message": "The access token expired"
  }
}
At C:\Users\maximla\Documents\PowerShell\Modules\Spotishell\0.1.9\Private\Send-SpotifyCall.ps1:67 char:19
+ ... $Response = Invoke-WebRequest -Method $Method -Headers $Header -Uri $ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (Method: GET, Reques…PowerShell/7.0.0
}:HttpRequestMessage) [Invoke-WebRequest], HttpResponseException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Song credits

Is it possible to get the info from fields "written by" and "produced by" in a tracks "Song credits"?

`played_at` should be avilable when getting recently played tracks

Is your feature request related to a problem? Please describe.
When fetching tracks with Get-RecentlyPlayedTracks as it is at the moment, no information regarding playback timestamp is available in spotishell, but the API does mention it being available (played_at).
A (re-)write to allow getting this information would solve the problem. The simplest change is to change $Response.items.track to $Response.items at the end of the function. But this would be a breaking change.

Describe the solution you'd like
I would like to be able to get the played_at value for each track. That way I might be able to page through my recently played tracks, using a combination of Limit and BeforeTimestamp/AfterTimestamp.

Describe alternatives you've considered
I considered adding an additional argument to Get-RecentlyPlayedTracks - something similar to a flag, eg. -ItemsNotTracks and then inside the function simply check on this, and either use the current logic when the flag is missing and then use the new logic when it is available.

$tracks = Get-RecentlyPlayedTracks #Would work as is
$items = Get-RecentlyPlayedTracks -ItemsNotTracks #would return items, which has (atleast) 2 properties: `played_at`, `track`

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.