Skip to content
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

Error when opening playlist; "Undefined offset: 1" #122

Closed
itsaphel opened this issue May 1, 2019 · 3 comments
Closed

Error when opening playlist; "Undefined offset: 1" #122

itsaphel opened this issue May 1, 2019 · 3 comments

Comments

@itsaphel
Copy link

itsaphel commented May 1, 2019

Getting this error when I try to open any playlist. Songs seem to work fine, as do albums.

Here's a relevant snippet from the error log:

# Error Log # 
## Error Info ## 
Undefined offset: 1
Line 16, /path/to/Alfred/Alfred.alfredpreferences/workflows/user.workflow.x/src/citelao/Spotifious/Menus/Detail.php

## Symbols ## 
Array
(
    [options] => Array
        (
            [depth] => 2
            [URIs] => Array
                (
                )

            [args] => Array
                (
                    [0] => spotify:playlist:37i9dQZF1DWXLeA8Omikj7
                    [1] => brain food
                )

            [search] => 
            [query] => spotify:playlist:37i9dQZF1DWXLeA8Omikj7 ⟩ brain food ⟩
        )

Seems to be fired at https://github.com/citelao/Spotify-for-Alfred/blob/master/src/citelao/Spotifious/Menus/Detail.php#L16 - contents of URIs there don't seem to match up with what the code is expecting.

Running v0.13.7 (https://github.com/citelao/Spotify-for-Alfred/releases/tag/v0.13.7)

@citelao
Copy link
Owner

citelao commented May 6, 2019

I'm getting the same issue, too. I'll take a look.

Thanks for reporting this!

@citelao
Copy link
Owner

citelao commented May 6, 2019

Looks like Spotify took the user: part out of it's playlist URLs:

is_spotify_uri is outdated.

Should probably read:

$regex = '/^(spotify:(?:album|artist|track|(?:user:[^:]+)?:playlist):[a-zA-Z0-9]+)$/x';

instead of

$regex = '/^(spotify:(?:album|artist|track|user:[^:]+:playlist):[a-zA-Z0-9]+)$/x';

@citelao
Copy link
Owner

citelao commented Jul 16, 2019

I've just pushed 0.13.8, which fixes the issue! Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants