Skip to content

Commit

Permalink
1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Sep 23, 2021
1 parent 85ae86c commit 3fe9264
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog
All notable changes to the Audio Player SONOS project will be documented in this file.

## 1.3.0 - 2021-09-21
## 1.3.0 - 2021-09-23
### Changed
- more NC compatibility
- updated event listener
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

[![Version](https://img.shields.io/github/release/rello/audioplayer_sonos.svg)](https://github.com/rello/audioplayer_sonos/blob/master/CHANGELOG.md) [![License: AGPLv3](https://img.shields.io/badge/license-AGPLv3-blue.svg)](http://www.gnu.org/licenses/agpl-3.0)   [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/rello/audioplayer_sonos/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/rello/audioplayer_sonos/?branch=master)   [![Bitcoin](https://img.shields.io/badge/donate-Bitcoin-blue.svg)](https://github.com/rello/audioplayer/wiki/donate) [![PayPal](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://github.com/rello/audioplayer/wiki/donate)

SONOS Playback add-on for the Audio Player in Nextcloud and ownCloud.
SONOS Playback add-on for the Audio Player in Nextcloud.

## Features
- Play your local library on your SONOS speaker

## Installation
- [Nextcloud App Store](https://apps.nextcloud.com/apps/audioplayer_sonos)
- [ownCloud Marketplace](https://marketplace.owncloud.com/apps/audioplayer_sonos)

This is not an independent app!
You have to install the [Audio Player](https://github.com/rello/audioplayer "Audio Player for Nextcloud and ownCloud") app (as of v2.8) to use this add-on.
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ theme: jekyll-theme-cayman
timezone: Europe/Berlin
name: "Audio Player - SONOS"
title: "Audio Player SONOS"
description: "Audio Player SONOS for Nextcloud and ownCloud"
description: "Audio Player SONOS for Nextcloud"
url: "https://github.com/rello/audioplayer_sonos"
author: "Marcel Scherello"
2 changes: 1 addition & 1 deletion appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

return [
Expand Down
2 changes: 1 addition & 1 deletion css/sonos.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

.sm2-inline-button.volume-shade {
Expand Down
2 changes: 1 addition & 1 deletion js/settings/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

'use strict';
Expand Down
2 changes: 1 addition & 1 deletion js/settings/personal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

'use strict';
Expand Down
2 changes: 1 addition & 1 deletion js/sonos.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

/* global Audios */
Expand Down
2 changes: 1 addition & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

namespace OCA\audioplayer_sonos\AppInfo;
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/DbController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

namespace OCA\audioplayer_sonos\Controller;
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/SettingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

namespace OCA\audioplayer_sonos\Controller;
Expand Down
20 changes: 10 additions & 10 deletions lib/Controller/SonosController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

namespace OCA\audioplayer_sonos\Controller;
Expand Down Expand Up @@ -76,6 +76,7 @@ public function setQueue($trackArray, $fileIndex)
$nodes = $this->rootFolder->getUserFolder($this->userId)->getById($fileId);
$file = array_shift($nodes);
$link = $this->smbFilePath($file);
//$this->logger->error($link);
$sonos->AddToQueue($link);
}

Expand Down Expand Up @@ -147,16 +148,15 @@ private function getDeviceByIp($ip)
private function smbFilePath($file)
{

$link = $file->getInternalPath();
$segments = explode(':', $file->getMountPoint()->getStorageId());
$type = $segments[0];

$path = $file->getPath();
$path_segments = explode('/', trim($path, '/'), 3);
$link = '';
$this->logger->debug($file->getMountPoint().' '.$path.' '.$type, array('app' => 'audioplayer_sonos'));

if ($type === 'smb') $link = $file->getInternalPath();
if ($type === 'shared') $link = $path_segments[2];
if ($type === 'shared') {
$path = $file->getPath();
$path_segments = explode('/', trim($path, '/'), 3);
$link = $path_segments[2];
}

return 'x-file-cifs://' . $this->smb_path . rawurlencode($link);
}
Expand Down Expand Up @@ -281,15 +281,15 @@ public function getStatus()
*/
public function getDebugInfo($trackid)
{
$smb_path = $this->configManager->getUserValue($this->userId, $this->appName, 'sonos_smb_path');
$this->smb_path = $this->configManager->getUserValue($this->userId, $this->appName, 'sonos_smb_path');
$fileId = $this->DBController->getFileId($trackid);
$nodes = $this->rootFolder->getUserFolder($this->userId)->getById($fileId);
$file = array_shift($nodes);

if ($file) $link = $this->smbFilePath($file);

$result = [
'smb' => $smb_path,
'smb' => $this->smb_path,
'sonos' => $link
];

Expand Down
2 changes: 1 addition & 1 deletion lib/Listener/LoadAdditionalScripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

namespace OCA\audioplayer_sonos\Listener;
Expand Down
2 changes: 1 addition & 1 deletion lib/Settings/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

namespace OCA\audioplayer_sonos\Settings;
Expand Down
2 changes: 1 addition & 1 deletion lib/Settings/Personal.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

namespace OCA\audioplayer_sonos\Settings;
Expand Down
2 changes: 1 addition & 1 deletion templates/part.sonos-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/
?>
<div class="sm2-bar-ui full-width">
Expand Down
2 changes: 1 addition & 1 deletion templates/settings/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

script('audioplayer_sonos', 'settings/admin');
Expand Down
2 changes: 1 addition & 1 deletion templates/settings/personal.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2019 Marcel Scherello
* @copyright 2016-2021 Marcel Scherello
*/

script('audioplayer_sonos', 'settings/personal');
Expand Down

0 comments on commit 3fe9264

Please sign in to comment.