Skip to content

Commit

Permalink
Refresh lib metadata button + request
Browse files Browse the repository at this point in the history
  • Loading branch information
sikelio committed Apr 13, 2023
1 parent a59af46 commit f4f10cb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/screens/ServerManage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ServerManage = ({ route }) => {
{ lib.title }
</Text>

<View style={ [style.item] }>
<View style={ [style.actionBtn] }>
<Button
title="Update"
color='#e5a00d'
Expand All @@ -79,6 +79,16 @@ const ServerManage = ({ route }) => {
}}
/>
</View>

<View style={ [style.actionBtn] }>
<Button
title="Metadata"
color='#e5a00d'
onPress={() => {
sendRequest(`${server.protocol}://${server.ip}:${server.port}/library/sections/${lib.key}/refresh?force=1&X-Plex-Token=${server.token}`);
}}
/>
</View>
</View>
);
})}
Expand Down
6 changes: 5 additions & 1 deletion src/style/ServerManageStyle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ const style = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
flexWrap: 'wrap',
alignItems: 'flex-start',
marginVertical: 2.5
},
item: {
color: '#000',
width: '50%'
width: '33%'
},
actionBtn: {
width: '33%'
},
accordionTitle: {
fontWeight: 'bold',
Expand Down

0 comments on commit f4f10cb

Please sign in to comment.