-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from godsgood33/master
Fixes and updates
- Loading branch information
Showing
29 changed files
with
1,520 additions
and
110 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.idea | ||
vendor | ||
composer.lock | ||
.env | ||
*.env | ||
*.cache |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Album | ||
|
||
The object to represent a music album | ||
|
||
## Property List | ||
|
||
| Data type | Property | Description | | ||
| :-------- | :---------------------- | :-------------------------------------------------- | | ||
| int | ratingKey | | | ||
| int | parentRatingKey | | | ||
| string | key | The key to get the details of the album | | ||
| string | parentKey | The link back to the artist | | ||
| string | guid | | | ||
| string | parentGuid | | | ||
| string | studio | The studio that produced the album | | ||
| string | type | The media type `album` | | ||
| string | title | The title of the album | | ||
| string | titleSort | The title used in sorting the album in the UI | | ||
| string | parentTitle | The name of the parent artist | | ||
| string | summary | | | ||
| string | rating | User rating | | ||
| int | index | | | ||
| int | viewCount | | | ||
| int | skipCount | | | ||
| int | year | The year the album was released | | ||
| DateTime | lastVeiwedAt | Date/time the album was last played | | ||
| DateTime | originallyAvailableAt | The date/time the album was released | | ||
| DateTime | addedAt | Date/time the album was added to the library | | ||
| DateTime | updatedAt | Date/time the album database entry was last changed | | ||
| string | thumb | URL to thumbnail | | ||
| string | parentThumb | URL to artist thumbnail | | ||
| int | loudnessAnalysisVersion | | | ||
| array | directory | | | ||
| array | genre | Genre's of music on the album | | ||
|
||
## Function List | ||
|
||
| Visibility | Function (parameters,...): return | | ||
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------- | | ||
| public | <strong>__construct()</strong>: <em>void</em><br /> | | ||
| public | <strong>__get(</strong><em>string</em> <strong>$var)</strong>: <em>mixed</em><br />Magic getter | | ||
| public | <strong>__set(</strong><em>string</em> <strong>\$var</strong>, <em>mixed</em> <strong>$val)</strong>: <em>void</em><br />Magic setter | | ||
| public | <strong>getChildren()</strong>: <em>ItemCollection:Track</em><br />Method to retrieve collection of tracks on this album | | ||
| public | <strong>addTrack(</strong><em>Track</em> <strong>$a)</strong>: <em>void</em> | | ||
| public static | <strong>fromLibrary(</strong><em>array</em> <strong>$library)</strong>: <em>Album</em><br />Create a Album from the Plex API call return | |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Artist | ||
|
||
The object to represent a music artist | ||
|
||
## Property List | ||
|
||
| Data type | Property | Description | | ||
| :-------- | :----------- | :-------------------------------------------------- | | ||
| int | ratingKey | | | ||
| string | key | The key to get the details of the artist | | ||
| string | guid | | | ||
| string | type | The media type `artist` | | ||
| string | title | The artist's name | | ||
| string | summary | | | ||
| int | index | | | ||
| int | viewCount | Number of times the artist details have been viewed | | ||
| int | skipCount | | | ||
| DateTime | lastViewedAt | Date/time somebody viewed this artist | | ||
| DateTime | addedAt | Date/time this artist was added to the database | | ||
| DateTime | updatedAt | Date/time this artist's database entry was updated | | ||
| string | thumb | URL to thumbnail image | | ||
| string | art | | | ||
| array | genre | Genre's of music the artist has performed in | | ||
| array | country | Country's the albums were recorded in | | ||
|
||
## Function List | ||
| Visibility | Function (parameters,...): return | | ||
| :------------ | :----------------------------------------------------------------------------------------------------------------------------------------- | | ||
| public | <strong>__construct()</strong>: <em>void</em><br /> | | ||
| public | <strong>__get(</strong><em>string</em> <strong>$var)</strong>: <em>mixed</em><br />Magic getter | | ||
| public | <strong>__set(</strong><em>string</em> <strong>\$var</strong>, <em>mixed</em> <strong>$val)</strong>: <em>void</em><br />Magic setter | | ||
| public | <strong>getChildren()</strong>: <em>ItemCollection:Album</em><br />Method to retrieve all albums written by this artist | | ||
| public | <strong>addAlbum(</strong><em>Album</em> <strong>$a)</strong>: <em>void</em> | | ||
| public static | <strong>fromLibrary(</strong><em>array</em> <strong>$library)</strong>: <em>Artist</em><br />Create a Artist from the Plex API call return | |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Tests | ||
|
||
## Intro | ||
|
||
PHPUnit is added for development purposes to be able to perform unit tests and make sure that all functions operate as expected. To accomplish this an `.env` file needs to be created in the `/tests` folder with the following information: | ||
|
||
| **Env** | **Value** | **Description** | | ||
| ---------------------- | -------------- | -------------------------------------------------------------------------- | | ||
| **PLEX_HOST** | *ip\|hostname* | IP or host name of the Plex server | | ||
| **PLEX_PORT** | *port* | Port to connect to Plex server (optional, defaults 32400) | | ||
| **PLEX_USER** | *email* | Username to login to Plex.tv (only needed once) | | ||
| **PLEX_PASSWORD** | *password* | Password to login to Plex.tv (only needed once) | | ||
| **PLEX_SSL** | *0\|1* | Boolean to connect to Plex server over SSL | | ||
| **MOVIE_TESTS** | *0\|1* | Boolean to conduct tests on movie library (optional) | | ||
| **MOVIE_SECTION_KEY** | *int* | Integer of movie library (run `composer sections` to see list | | ||
| **MOVIE_ITEM_ID** | *int* | Integer key of a specific movie to pull metadata for | | ||
| **MOVIE_SEARCH_QUERY** | *string* | String query to search for in Movie library | | ||
| **MOVIE_FILTER_QUERY** | *string* | String query to filter for in Movie library (must be a 'title') | | ||
| **TV_TESTS** | *0\|1* | Boolean to conduct tests of TV library (optional) | | ||
| **TV_SECTION_KEY** | *int* | Integer of TV library (run `composer sections` to see list) | | ||
| **TV_ITEM_ID** | *int* | Integer key of a specific TV show, season, or episode to pull metadata for | | ||
| **TV_SEARCH_QUERY** | *string* | String query to search for in TV library | | ||
| **TV_FILTER_QUERY** | *string* | String query to filter for in TV library (must be 'title') | | ||
| **MUSIC_TESTS** | *0\|1* | Boolean to conduct tests of Music library (optional) | | ||
| **MUSIC_SECTION_KEY** | *int* | Integer of Music library (run `composer sections` to see list | | ||
| **MUSIC_SEARCH_QUERY** | *string* | String query to search for in Music library | | ||
| **MUSIC_FILTER_QUERY** | *string* | String query to filter for in Music library | | ||
|
||
The `PLEX_*` values are required. The username and password values can be deleted after the token is retrieved | ||
|
||
`*_TESTS` are optional, if they are not present, those tests will not be run. If they are present, then the similar ENV values are required. | ||
|
||
Once you have the PLEX_* values present you can run `composer sections` to retrieve the section keys for your libraries. Put in the section keys for the tests you want to run. After you've made the changes, run `composer test` to run php tests |
Oops, something went wrong.