コード例 #1
0
        private async void Button_Click(object sender, RoutedEventArgs e) {
            var baseUri = BaseUriBox.Text;
            var username = UserBox.Text;
            var password = PassBox.Text;

            Result.Text = "";
            try {
                SubsonicClient client = new SubsonicClient(baseUri, username, password, "lol");
                var result = await client.GetIndexes();
                Result.Text = "Music:\n";
            } catch (SubsonicApiException ex) {
                Result.Text = ex.ToString();
            }
        }
コード例 #2
0
ファイル: Search.cs プロジェクト: jalabulajunx/SubsonicSharp
 public Search(SubsonicClient client)
 {
     Client = client;
 }
コード例 #3
0
 internal ClientBrowser(SubsonicClient client)
 {
     Client = client;
 }
コード例 #4
0
 public Bookmarks(SubsonicClient client)
 {
     Client = client;
 }
コード例 #5
0
 public MediaRetrieval(SubsonicClient client)
 {
     Client = client;
 }
コード例 #6
0
        private void InitSubsonicApi()
        {
            Uri serverUri = new Uri(ServerUrl);
            string proxyUri = string.IsNullOrWhiteSpace(ProxyServer) ? null : ProxyServer;
            
            if (!ValidateCertificate(serverUri))
            {
                FileLogger.Log("Unable to validate server certificate, this issue must be corrected before continuing.", LoggingLevel.Error);
                MessageBox.Show("Unable to validate server certificate, this issue must be corrected before continuing.", AppName, MessageBoxButton.OK, MessageBoxImage.Error);
                SubsonicClient = null;
            }
            else
            {
                SubsonicServer = UseProxy ? new SubsonicServer(serverUri, Username, Password, ClientName, proxyUri, ProxyPort, ProxyUsername, ProxyPassword) : new SubsonicServer(serverUri, Username, Password, ClientName);

                SubsonicClient = new SubsonicClient(SubsonicServer, new ImageFormatFactory());
                SubsonicClient.PingAsync(GetCancellationToken("InitSubsonicApi")).ContinueWith(ValidateServerVersion);
            }
        }
コード例 #7
0
 public Playlists(SubsonicClient client)
 {
     Client = client;
 }
コード例 #8
0
 public Chat(SubsonicClient client)
 {
     Client = client;
 }
コード例 #9
0
 public Podcasts(SubsonicClient client)
 {
     Client = client;
 }
コード例 #10
0
 public InformationLists(SubsonicClient client)
 {
     Client = client;
 }
コード例 #11
0
 public MediaAnnotation(SubsonicClient client)
 {
     Client = client;
 }