Skip to content

Commit

Permalink
Update empty.trash
Browse files Browse the repository at this point in the history
  • Loading branch information
madslundt authored Nov 21, 2017
1 parent b182898 commit 23c6f2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/empty.trash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ getSections() {
exit 02
fi

sections=$(curl -s -G -L "${plex_url}/library/sections?X-Plex-Token=${plex_token}" | xpath -e "/MediaContainer/Directory/@key" 2>&1 | sed -re 's/-- NODE --//g'$
sections=$(curl -s -G -L "${plex_url}/library/sections?X-Plex-Token=${plex_token}" | xpath -e "/MediaContainer/Directory/@key" 2>&1 | sed -re 's/-- NODE --//g' | sed -re 's/key=\"//g' | sed -re 's/\"//g' | sed '/^\s*$/d' | sed '$ d' | awk 'BEGIN {sq = ""; OFS = sq "," sq} {a[$1] = NR} END { printf "" sq; for (i in a) { printf "%s%s", d, i; d = OFS}; print sq "" }')
echo $sections
}

Expand Down

0 comments on commit 23c6f2d

Please sign in to comment.