Skip to content

Commit

Permalink
Merge pull request #92 from citelao/dev
Browse files Browse the repository at this point in the history
Master: Playlist search!
  • Loading branch information
citelao committed Jun 4, 2017
2 parents bdf32ce + 1736cec commit 2095af4
Show file tree
Hide file tree
Showing 75 changed files with 674 additions and 10,809 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
*.sublime-workspace

# build cruft
build/
build/

# vendor
vendor/
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: php
php:
- 5.4
- 5.5
- 5.6
install: make clean init
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog #

## v0.13.3 #
- Added: Alfred-native hotkey activation means a huge speedboost to hotkeys
- Added: Cache your playlists to add them to search
- Fixed: API search now uses Authentication all the time
- Changed: Do not source control vendor/
- Changed: Use a newer version of JWilsson's API.
- Removed: Opt-out does not work with the Spotify API anymore, so it's removed

## v0.13.2.1 #
- Fixed: Setup bug where Spotifious expects client ID before it exists

Expand Down
33 changes: 28 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,44 @@
.PHONY = all init clean build.intermediates build.images build

.PHONY: all
all: clean build

init:
composer install
.PHONY: help
help:
@echo "Make Spotifious!"
@echo ""
@echo "Available commands:"
@$(MAKE) -f $(lastword $(MAKEFILE_LIST)) list

# https://stackoverflow.com/questions/4219255/how-do-you-get-the-list-of-targets-in-a-makefile
.PHONY: list
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'

.PHONY: clean
clean:
-rm -r dist/
-rm -r build/

.PHONY: init
init: vendor

# https://stackoverflow.com/questions/5618615/check-if-a-program-exists-from-a-makefile
COMPOSER_INSTALLED := $(shell command -v composer 2> /dev/null)
vendor:
ifndef COMPOSER_INSTALLED
$(error Please install composer globally. https://getcomposer.org/download/)
endif
composer install

.PHONY: build.intermediates
build.intermediates:
mkdir build/
@echo "TODO BUILD IN BUILD DIRECTORY"

.PHONY: build.images
build.images:
@echo "TODO COMPILE IMAGES"

build: build.intermediates build.images
.PHONY: build
build: init build.intermediates build.images
mkdir dist/
zip -q -x '*.git*' '*include/images/psd*' '*include/screenshots*' '*.psd' -r dist/Spotifious.alfredworkflow ./
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ A lot of people helped out on this:
Thanks to everyone who helped, and thanks to everyone who uses my work!
Oh, and thanks for reading this whole README. I hope you enjoy Spotifious!

## Development ##

You must install dependencies manually. Install
[Composer](https://getcomposer.org/) and then run `make init`. Then you can
proceed with development! (if you do not want to do a global install, run
`php composer.phar install` from this directory)

Command line development for Alfred 3 is currently not working, since we
depend on several environment variables. Eventually, if you are developing for
Alfred version 3 and want to run these files from
the command line (`php -f main.php -- "args"`), you will need to run in debug
mode : `DEBUG=true php -f main.php -- "args"`.

## TODO ##

- Allow ``, `^`, and `` to function as modifiers (Open in Spotify, other things?).
Expand Down
4 changes: 2 additions & 2 deletions callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
$success = !array_key_exists('error', $_GET);

if($success) {
$session->requestToken($_GET['code']);
$session->requestAccessToken($_GET['code']);

// Save the tokens
$alfred->options("spotify_access_token", $session->getAccessToken());
$alfred->options("spotify_refresh_token", $session->getRefreshToken());
$alfred->options("spotify_access_token_expires", time() + $session->getExpires());
$alfred->options("spotify_access_token_expires", $session->getTokenExpiration());

$alfred->options('registered_scopes', $alfred->options('desired_scopes'));
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
}
},
"require": {
"jwilsson/spotify-web-api-php": "0.6.*"
"jwilsson/spotify-web-api-php": "^1.0.0"
}
}
26 changes: 14 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/Spotifious.alfredworkflow
Binary file not shown.
Binary file added include/images/playlist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added include/images/psd/playlist.psd
Binary file not shown.
Loading

0 comments on commit 2095af4

Please sign in to comment.