Merge pull request #161 from jb-alvarado/master

remove group from service, create plalist  folders
This commit is contained in:
jb-alvarado 2022-07-19 14:49:22 +02:00 committed by GitHub
commit eebe27ed1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
RestartSec=1
User=ffpu
Group=ffpu
[Install]
WantedBy=multi-user.target

View File

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

View File

@ -8,7 +8,6 @@ Restart=always
RestartSec=1
KillMode=mixed
User=ffpu
Group=ffpu
[Install]
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())
.with_extension("json");
if let Some(p) = playlist_path.parent() {
fs::create_dir_all(p)?;
}
if playlist_path.is_file() {
if let Ok(existing_data) = json_reader(&playlist_path) {
if json_data == existing_data {