remove group from service, create plalist folders

This commit is contained in:
jb-alvarado 2022-07-19 14:47:40 +02:00
parent 072d9a10f3
commit 3fa004249d
4 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,6 @@ ExecStart=/usr/bin/ffpapi -l 127.0.0.1:8000
Restart=always Restart=always
RestartSec=1 RestartSec=1
User=ffpu User=ffpu
Group=ffpu
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -8,7 +8,6 @@ Restart=always
RestartSec=1 RestartSec=1
KillMode=mixed KillMode=mixed
User=ffpu User=ffpu
Group=ffpu
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -8,7 +8,6 @@ Restart=always
RestartSec=1 RestartSec=1
KillMode=mixed KillMode=mixed
User=ffpu User=ffpu
Group=ffpu
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -54,6 +54,10 @@ pub async fn write_playlist(id: i64, json_data: JsonPlaylist) -> Result<String,
.join(date.clone()) .join(date.clone())
.with_extension("json"); .with_extension("json");
if let Some(p) = playlist_path.parent() {
fs::create_dir_all(p)?;
}
if playlist_path.is_file() { if playlist_path.is_file() {
if let Ok(existing_data) = json_reader(&playlist_path) { if let Ok(existing_data) = json_reader(&playlist_path) {
if json_data == existing_data { if json_data == existing_data {