1import{M as p,j as e,T as s,Q as a,P as c,r as d,V as l}from"./main-BEfQELxr.js";import{a as u}from"./admin-config-BaCrw7Kt.js";import{S as f}from"./settings-error-group-BAeciTuR.js";import{A as h}from"./settings-layout-CUpx_aK_.js";import{D as g}from"./settings-links-BagG4yO6.js";import{S as r}from"./settings-panel-9vXv66Le.js";import{u as x}from"./use-admin-settings-B1D6D_PM.js";import{F as n}from"./select-DvPFHFsY.js";import{F as m}from"./switch-kVp777pB.js";import{g as j}from"./languages-DRZfms_v.js";import"./Album-CXNrxcWI.js";import"./Comment-TqhRbk6J.js";import"./FileUpload-DPKPUe4e.js";import"./Mic-cPqrQSx8.js";import"./PlaylistPlay-jDnYmdDX.js";import"./QueueMusic-C8vaKlwp.js";import"./Sell-DvbBmLb2.js";import"./middleware-BLXTWOs6.js";import"./use-admin-settings-page-nav-config-CxHuJeZb.js";import"./datatable-page-with-header-layout-DgFKm91D.js";import"./dashboard-layout-context-Ors6hOMs.js";import"./use-toggle-dashboard-left-sidebar-BNAUqBUz.js";import"./file-upload-provider-eR3r-15c.js";import"./uploaded-file-DYvUNPPs.js";import"./extension-from-filename-O0XMuZye.js";import"./pretty-bytes-bO14ePu9.js";import"./traditional-D9TTECMQ.js";import"./confirmation-dialog-CYwhNB58.js";import"./dialog-footer-DZFPEWVp.js";import"./external-link-CT1zJoZ3.js";import"./useSuspenseQuery-CLDVgKJu.js";import"./combobox-end-adornment-B98K5MYg.js";import"./countries-EFifpL8Y.js";function ae(){var t;const{data:i}=x(),o=p({defaultValues:{client:{artist_provider:i.client.artist_provider??!1,album_provider:i.client.album_provider??!1,search_provider:i.client.search_provider??!1,artist_bio_provider:i.client.artist_bio_provider??"local",wikipedia_language:i.client.wikipedia_language??"en",player:{lyrics_automate:((t=i.client.player)==null?void 0:t.lyrics_automate)??!1}},server:{spotify_id:i.server.spotify_id??"",spotify_secret:i.server.spotify_secret??"",lastfm_api_key:i.server.lastfm_api_key??""}}});return e.jsxs(h,{form:o,title:e.jsx(s,{message:"Content automation"}),docsLink:u.settings.automation,children:[e.jsx(y,{}),e.jsx(b,{}),e.jsx(v,{}),e.jsx(_,{}),e.jsx(S,{})]})}function y(){return e.jsxs(r,{className:"mb-24",title:e.jsx(s,{message:"Artist Automation"}),description:e.jsx(s,{message:"Configure automatic import and updates of artist metadata and biographies."}),children:[e.jsx(m,{size:"sm",name:"client.artist_provider",value:"spotify",description:e.jsx(s,{message:"This will automatically import, and periodically update, all metadata available on spotify about the artist when user visits that artist's page."}),children:e.jsx(s,{message:"Enable artist automation"})}),e.jsx(w,{})]})}function b(){return e.jsx(r,{className:"mb-24",title:e.jsx(s,{message:"Album Automation"}),description:e.jsx(s,{message:"Configure automatic import and updates of album metadata."}),children:e.jsx(m,{size:"sm",name:"client.album_provider",value:"spotify",description:e.jsx(s,{message:"This will automatically import, and periodically update, all metadata available on spotify about an album when user visits that album's page."}),children:e.jsx(s,{message:"Enable album automation"})})})}function v(){return e.jsx(r,{className:"mb-24",title:e.jsx(s,{message:"Search Provider"}),description:e.jsx(s,{message:"Configure which method should be used for user facing search in the web player."}),children:e.jsxs(n,{size:"sm",name:"client.search_provider",selectionMode:"single",label:e.jsx(s,{message:"Search method"}),children:[e.jsx(a,{value:"spotify",description:e.jsx(s,{message:"Search on the site will directly connect to, and search spotify. Any artist, album and track available on spotify will be discoverable via search, without needing to import or create it first."}),children:e.jsx(s,{message:"Spotify"})}),e.jsx(a,{value:"local",description:e.jsx(s,{message:"Will only search content that was created or imported from backstage or admin area. This can be further configured from 'Local search' settings page."}),children:e.jsx(s,{message:"Local"})}),e.jsx(a,{value:"localAndSpotify",description:e.jsx(s,{message:"Will combine search results from both 'local' and 'spotify' methods. If there are identical matches, local results will be preferred."}),children:e.jsx(s,{message:"Local and spotify"})})]})})}function _(){return e.jsx(r,{className:"mb-24",title:e.jsx(s,{message:"Lyrics Automation"}),description:e.jsx(s,{message:"Configure automatic lyrics import for tracks."}),children:e.jsx(m,{size:"sm",name:"client.player.lyrics_automate",value:"spotify",description:e.jsx(s,{message:"Try to automatically find and import lyrics based on song and artist name. Lyrics can still be added manually, if this is disabled."}),children:e.jsx(s,{message:"Enable lyrics automation"})})})}function w(){const i=j(),{watch:o}=c();return e.jsxs("div",{className:"mt-24 flex gap-12",children:[e.jsxs(n,{size:"sm",className:"flex-1",name:"client.artist_bio_provider",selectionMode:"single",label:e.jsx(s,{message:"Artist biography provider"}),children:[e.jsx(a,{value:"wikipedia",description:e.jsx(s,{message:"Will import artist biography from wikipedia in the selected language."}),children:e.jsx(s,{message:"Wikipedia"})}),e.jsx(a,{value:"local",description:e.jsx(s,{message:"Will only show artist biography that was manually added from admin area or backstage."}),children:e.jsx(s,{message:"Local"})})]}),o("client.artist_bio_provider")==="wikipedia"&&e.jsx(n,{size:"sm",name:"client.wikipedia_language",className:"flex-1",label:e.jsx(s,{message:"Language"}),selectionMode:"single",showSearchField:!0,children:i.map(t=>e.jsx(a,{value:t.code,children:t.name},t.code))})]})}function S(){const{watch:i}=c();return[i("client.artist_provider"),i("client.album_provider"),i("client.search_provider")].some(t=>`${t}`.toLowerCase().includes("spotify"))?e.jsx(r,{className:"mb-24",title:e.jsx(s,{message:"API Credentials"}),description:e.jsx(s,{message:"Configure API credentials for external services used by automation features."}),link:e.jsx(g,{link:"https://support.vebto.com/hc/articles/28/34/165/spotify-credentials"}),children:e.jsx(f,{name:"spotify_group",separatorBottom:!1,separatorTop:!1,children:t=>e.jsxs(d.Fragment,{children:[e.jsx(l,{size:"sm",invalid:t,name:"server.spotify_id",label:e.jsx(s,{message:"Spotify ID"}),required:!0}),e.jsx(l,{size:"sm",className:"mt-24",invalid:t,name:"server.spotify_secret",label:e.jsx(s,{message:"Spotify secret"}),required:!0}
1),e.jsx(l,{size:"sm",className:"mt-24",name:"server.lastfm_api_key",label:e.jsx(s,{message:"LastFM Api Key"})})]})})}):null}export{ae as Component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.