Skip to content

Commit

Permalink
Changes for version 0.12.0 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Radiicall authored Jun 24, 2023
2 parents 9229818 + 6596452 commit ec2f968
Show file tree
Hide file tree
Showing 13 changed files with 597 additions and 369 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jellyfin-rpc"
version = "0.11.2"
version = "0.12.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,38 @@ Terminal Output:

## Setup
- Installers
- <a href="https://github.com/Radiicall/jellyfin-rpc/raw/main/scripts/Auto-Install-win.bat">Windows</a>
- <a href="https://github.com/Radiicall/jellyfin-rpc/raw/main/scripts/Auto-install-macos.sh">macOS</a>
- <a href="https://github.com/Radiicall/jellyfin-rpc/raw/main/scripts/install-win.bat">Windows</a>
- <a href="https://github.com/Radiicall/jellyfin-rpc/raw/main/scripts/install-macos.sh">macOS</a>

Make a `main.json` file with the following items in `$XDG_CONFIG_HOME/jellyfin-rpc` on Linux/macOS and `%APPDATA%\jellyfin-rpc\main.json` on Windows.

If you're unsure about the directory then run jellyfin-rpc and it will tell you where to place it.

```
{
"Jellyfin": {
"URL": "https://example.com",
"API_KEY": "sadasodsapasdskd",
"USERNAME": "your_username_here",
"_comment": "the 2 lines below and this line arent needed and should be removed, by default nothing will display if these are present"
"TYPE_BLACKLIST": ["music", "movie", "episode", "livetv"]
"LIBRARY_BLACKLIST": ["Anime", "Anime Movies"]
"jellyfin": {
"url": "https://example.com",
"api_key": "sadasodsapasdskd",
"username": "your_username_here",
"music": {
"display": "genres",
"separator": "-"
},
"_comment": "the 4 lines below and this line arent needed and should be removed, by default nothing will display if these are present",
"blacklist": {
"media_types": ["music", "movie", "episode", "livetv"],
"libraries": ["Anime", "Anime Movies"]
}
},
"Discord": {
"APPLICATION_ID": "1053747938519679018"
"discord": {
"application_id": "1053747938519679018"
},
"Imgur": {
"CLIENT_ID": "asdjdjdg394209fdjs093"
"imgur": {
"client_id": "asdjdjdg394209fdjs093"
},
"Images": {
"ENABLE_IMAGES": true,
"IMGUR_IMAGES": true
"images": {
"enable_images": true,
"imgur_images": true
}
}
```
Expand Down
34 changes: 20 additions & 14 deletions example.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
{
"Jellyfin": {
"URL": "https://example.com",
"API_KEY": "sadasodsapasdskd",
"USERNAME": "your_username_here",
"_comment": "the 2 lines below and this line arent needed and should be removed, by default nothing will display if these are present"
"TYPE_BLACKLIST": ["music", "movie", "episode", "livetv"]
"LIBRARY_BLACKLIST": ["Anime", "Anime Movies"]
"jellyfin": {
"url": "https://example.com",
"api_key": "sadasodsapasdskd",
"username": "your_username_here",
"music": {
"display": "genres",
"separator": "-"
},
"_comment": "the 4 lines below and this line arent needed and should be removed, by default nothing will display if these are present",
"blacklist": {
"media_types": ["music", "movie", "episode", "livetv"],
"libraries": ["Anime", "Anime Movies"]
}
},
"Discord": {
"APPLICATION_ID": "1053747938519679018"
"discord": {
"application_id": "1053747938519679018"
},
"Imgur": {
"CLIENT_ID": "asdjdjdg394209fdjs093"
"imgur": {
"client_id": "asdjdjdg394209fdjs093"
},
"Images": {
"ENABLE_IMAGES": true,
"IMGUR_IMAGES": true
"images": {
"enable_images": true,
"imgur_images": true
}
}
29 changes: 16 additions & 13 deletions scripts/Auto-install-macos.sh → scripts/install-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ vared -p "Jellyfin API Key (you can find this at ${jellyfinurl}/web/#!/apikeys.h
vared -p "Jellyfin Username: " -c jellyfinuser
echo ""

echo "The blacklist creation in this script is currently broken"
echo "Check the README for details on how to set it up in the config "

# Prompt the user for what libraries should be included/blocked
responses=()

Expand Down Expand Up @@ -95,38 +98,38 @@ fi
configFileContents=""
configFileContents+="$(cat <<EOF
{
"Jellyfin": {
"URL": "${jellyfinurl}",
"API_KEY": "${jellyfinkey}",
"USERNAME": "${jellyfinuser}"
"jellyfin": {
"url": "${jellyfinurl}",
"api_key": "${jellyfinkey}",
"username": "${jellyfinuser}"
EOF
)"
if [[ ${#responses} -ne 0 ]]; then # only add this line if there are items in the blocklist
configFileContents+="$(cat <<EOF
,
"TYPE_BLACKLIST": ${typeBlocklistString}
"type_blacklist": ${typeBlocklistString}
EOF
)"
fi
if [[ ${#libBlocklistArray} -ne 0 ]]; then # only add this line if there are items in the library blocklist
configFileContents+="$(cat <<EOF
,
"LIBRARY_BLACKLIST": ${libBlocklistString}
"library_blacklist": ${libBlocklistString}
EOF
)"
fi
configFileContents+="$(cat <<EOF
},
"Discord": {
"APPLICATION_ID": "${discordAppId}"
"discord": {
"application_id": "${discordAppId}"
},
"Imgur": {
"CLIENT_ID": "${imgurId}"
"imgur": {
"client_id": "${imgurId}"
},
"Images": {
"ENABLE_IMAGES": ${configImagesEnabled},
"IMGUR_IMAGES": ${configImgurEnabled}
"images": {
"enable_images": ${configImagesEnabled},
"imgur_images": ${configImgurEnabled}
}
}
EOF
Expand Down
22 changes: 11 additions & 11 deletions scripts/Auto-Install-win.bat → scripts/install-win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ set /p IMAGES_IMGUR_IMAGES=Enable images from Imgur (true/false) [%IMAGES_IMGUR_

rem Output the JSON data to the file
echo { > main.json
echo "Jellyfin": { >> main.json
echo "URL": "%JELLYFIN_URL%", >> main.json
echo "API_KEY": "%JELLYFIN_API_KEY%", >> main.json
echo "USERNAME": "%JELLYFIN_USERNAME%" >> main.json
echo "jellyfin": { >> main.json
echo "url": "%JELLYFIN_URL%", >> main.json
echo "api_key": "%JELLYFIN_API_KEY%", >> main.json
echo "username": "%JELLYFIN_USERNAME%" >> main.json
echo }, >> main.json
echo "Discord": { >> main.json
echo "APPLICATION_ID": "%DISCORD_APPLICATION_ID%" >> main.json
echo "discord": { >> main.json
echo "application_id": "%DISCORD_APPLICATION_ID%" >> main.json
echo }, >> main.json
echo "Imgur": { >> main.json
echo "CLIENT_ID": "%IMGUR_CLIENT_ID%" >> main.json
echo "imgur": { >> main.json
echo "client_id": "%IMGUR_CLIENT_ID%" >> main.json
echo }, >> main.json
echo "Images": { >> main.json
echo "ENABLE_IMAGES": %IMAGES_ENABLE_IMAGES%, >> main.json
echo "IMGUR_IMAGES": %IMAGES_IMGUR_IMAGES% >> main.json
echo "images": { >> main.json
echo "enable_images": %IMAGES_ENABLE_IMAGES%, >> main.json
echo "imgur_images": %IMAGES_IMGUR_IMAGES% >> main.json
echo } >> main.json
echo } >> main.json

Expand Down
185 changes: 0 additions & 185 deletions src/config.rs

This file was deleted.

Loading

0 comments on commit ec2f968

Please sign in to comment.