Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 rpm #430

Open
wants to merge 111 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
141ba68
Upgrade to python3, disable chromecast support
aharter Oct 1, 2018
cc0c683
Upgrade dependencies to support python3
aharter Oct 18, 2018
dae2a68
Add missing dependencies
aharter Oct 18, 2018
28e52b3
Upgrade Makefile and bootstrap.sh to python3
aharter Oct 18, 2018
d777f31
Re-enable chromecast support using pychromecast
aharter Oct 21, 2018
4bbae45
Update README to python3
aharter Oct 23, 2018
787044f
fix UnicodeDecodeError
dadosch Dec 21, 2018
e7357dc
Merge pull request #1 from dadosch/patch-1
aharter Jan 31, 2019
4a0e92b
flake8
masmu Jan 31, 2019
fb83486
Fixed the Chromecast plugin
masmu Jan 31, 2019
59ee141
Removed unused imports
masmu Jan 31, 2019
b3fb68f
Fixed and updated chomecast-beam
masmu Jan 31, 2019
0607821
Fixed the root mode
masmu Jan 31, 2019
5e795f2
Fix exception handling in DLNA renderer
masmu Feb 5, 2019
b0db813
Ensure that provided URLs of DLNA devices are absolute
masmu Feb 9, 2019
6a097fa
rpm tweaks
Feb 12, 2019
2678571
added python3 libs unavaiable on fedora
Feb 12, 2019
41aa19b
enforce pip3
Feb 12, 2019
91e2f42
enforce pip3
Feb 12, 2019
afc1262
gzip manpages for rpm
Feb 12, 2019
63a46ef
gzip manpages for rpm
Feb 12, 2019
52e5479
Enfore pip3
Feb 12, 2019
df6f386
added notify2.py
Feb 12, 2019
a095f74
gzip manpages for rpm
Feb 12, 2019
47a4077
rpm compatibility tweaks
Feb 12, 2019
d46f419
Wait for Chromecast device to be ready
antgel Apr 14, 2020
d71bd14
Merge pull request #2 from antgel/antgel-wait-for-device
Cygn Apr 29, 2020
e0d986f
Merge branch 'python3-rpm' into python3
Cygn Apr 29, 2020
1eb05ab
Merge pull request #3 from Cygn/python3
Cygn Apr 29, 2020
fb944b8
Update byto.py
stuaxo Oct 31, 2020
00cd665
Update discover.py
Cygn Nov 4, 2020
c6200c0
bump to 0.6.1 for recent fixes
Nov 4, 2020
7a21698
rollback
Nov 4, 2020
7d9652a
Merge pull request #6 from stuaxo/patch-1
Cygn Dec 13, 2020
080006d
Merge pull request #7 from Cygn/python3
Cygn Dec 13, 2020
f6c26b3
Fix bugs with pychromecast 7.5.1
mfdgroot Dec 24, 2020
b522e29
Merge pull request #9 from mfdgroot/python3
Cygn Dec 25, 2020
70a9a19
Merge pull request #10 from Cygn/python3
Cygn Dec 25, 2020
9831022
v-.1
Dec 25, 2020
77b1c85
v6.1
Dec 25, 2020
e3eeaa1
Merge branch 'python3-rpm' of github.com:Cygn/pulseaudio-dlna into py…
Dec 25, 2020
c0dbcdf
Merge pull request #11 from Cygn/python3-rpm
Cygn Dec 25, 2020
d6adca1
Update README.md
Cygn Dec 25, 2020
1e1a1e6
Merge pull request #12 from Cygn/python3
Cygn Dec 25, 2020
ec63306
Updated setup.py
Dec 25, 2020
b983847
Merge pull request #13 from Cygn/python3-rpm
Cygn Dec 25, 2020
a39a119
Merge pull request #14 from Cygn/python3
Cygn Dec 25, 2020
7b0eddc
added spec file as reference
Dec 25, 2020
8e1090e
added spec file as reference
Dec 25, 2020
9f95888
spec file rewrite for better uninstall
Jan 3, 2021
11e5891
make sure to nuke previous version when rpm update
Jan 3, 2021
846d721
prepare for copr/scm build
Jan 3, 2021
8c11067
prepare for copr/scm build
Jan 3, 2021
52d97bf
prepare for copr/scm build
Jan 3, 2021
21a169c
prepare for copr/scm build
Jan 3, 2021
f89fb06
prepare for copr/scm build
Jan 3, 2021
905da92
prepare for copr/scm build
Jan 3, 2021
7d5cc87
remove all files from previous installs
Cygn Jan 3, 2021
1af6e61
require pychromecast 7.5.1
Cygn Jan 3, 2021
3a43c3c
Update README.md
Cygn Jan 21, 2021
7d138fd
Update README.md
Cygn Jan 21, 2021
6353f7d
Update README.md
Cygn Jan 21, 2021
af6c0cc
Update README.md
Cygn Jan 21, 2021
fbe2e31
Update README.md
Cygn Jan 21, 2021
a3de2dd
Merge pull request #16 from Cygn/python3
Cygn Jan 21, 2021
6ea7f2f
added setup.cfg for LICENCE
Jan 21, 2021
4f16e9c
put requires in setup.py instead of .spec
Jan 21, 2021
fac8270
put requires in setup.py instead of .spec
Jan 21, 2021
2242800
put requires in setup.py instead of .spec
Jan 21, 2021
d192bd4
put requires in setup.py instead of .spec
Jan 21, 2021
586fd7c
Merge pull request #17 from Cygn/python3-rpm
Cygn Jan 21, 2021
b4aba8d
Update pulseaudio-dlna.spec
Cygn Nov 3, 2021
99e04fd
Update README.md
Cygn Nov 9, 2021
d89a47a
Update README.md
Cygn Nov 9, 2021
637a2e7
Update README.md
Cygn Nov 9, 2021
1962e61
check if mime types are parsable
linus-ha Nov 26, 2021
0c0162a
Merge pull request #24 from linus-ha/patch-1
Cygn Nov 30, 2021
a16389a
Bump to 0.6.2 following linus-ha's patch
Cygn Nov 30, 2021
77aeddf
Bump to 0.6.2
Cygn Nov 30, 2021
afbd50e
Merge pull request #25 from Cygn/python3
Cygn Nov 30, 2021
19e4aa8
Update README.md
Cygn Nov 30, 2021
1d17881
Add missing dependencies
johschmitz Dec 9, 2021
eb4f94a
Merge pull request #28 from johschmitz/patch-2
Cygn Dec 14, 2021
bb27c1b
reqire pychromecast <10
Cygn Dec 26, 2021
c22858d
Merge pull request #31 from Cygn/master
Cygn Dec 26, 2021
a67e727
Update pulseaudio-dlna.spec
Cygn Dec 26, 2021
6131cad
bump to 0.6.3
Cygn Dec 26, 2021
a1a2616
Merge pull request #32 from Cygn/master
Cygn Dec 26, 2021
165678d
Merge pull request #33 from Cygn/python3-rpm
Cygn Dec 26, 2021
3a3253d
Initialized to use tito.
Cygn Dec 27, 2021
a0e952b
Automatic commit of package [pulseaudio-dlna] release [0.6.3-1].
Cygn Dec 27, 2021
79dd8d5
package build
Cygn Dec 27, 2021
b6af362
revert 1d178810a2eb93aa508734a5d8ca21ad65bd1c72, breaks RPM
Cygn Dec 27, 2021
d56908c
new release
Cygn Dec 27, 2021
1a2f035
Automatic commit of package [pulseaudio-dlna] release [0.6.3-2].
Cygn Dec 27, 2021
384350d
Automatic commit of package [pulseaudio-dlna] release [0.6.3-3].
Cygn Dec 27, 2021
c950b48
new release
Cygn Dec 27, 2021
8bfea88
Automatic commit of package [pulseaudio-dlna] release [0.6.3-4].
Cygn Dec 27, 2021
3cdcf84
Automatic commit of package [pulseaudio-dlna] release [0.6.3-5].
Cygn Dec 27, 2021
061103f
Automatic commit of package [pulseaudio-dlna] release [0.6.3-6].
Jan 6, 2022
9fc3e52
pychromecast 10 compatible now
Cygn Jan 8, 2022
cc95600
pychromecast 10 compatiblity
Cygn Jan 8, 2022
eeed6d4
Merge branch 'python3-rpm' into master
Cygn Jan 8, 2022
6858f4c
Merge pull request #35 from Cygn/master
Cygn Jan 8, 2022
cbb87da
Automatic commit of package [pulseaudio-dlna] release [0.6.4-1].
Cygn Jan 8, 2022
776c3bb
Merge pull request #36 from Cygn/python3-rpm
Cygn Jan 17, 2022
7cc6b79
requires pychromecast 10
Cygn Mar 19, 2022
7bf9cf1
Merge pull request #42 from Cygn/master
Cygn Mar 19, 2022
d4dd497
Automatic commit of package [pulseaudio-dlna] release [0.6.5-1].
Cygn Mar 19, 2022
4e9c09d
fix processing of dict-encapsulated sink mime support response
Cygn Dec 29, 2022
c8b4a0f
Automatic commit of package [pulseaudio-dlna] release [0.6.6-1].
Cygn Dec 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .tito/packages/.readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
the .tito/packages directory contains metadata files
named after their packages. Each file has the latest tagged
version and the project's relative directory.
1 change: 1 addition & 0 deletions .tito/packages/pulseaudio-dlna
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.6.6-1 ./
5 changes: 5 additions & 0 deletions .tito/tito.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[buildconfig]
builder = tito.builder.Builder
tagger = tito.tagger.VersionTagger
changelog_do_not_remove_cherrypick = 0
changelog_format = %s (%ae)
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@
# You should have received a copy of the GNU General Public License
# along with pulseaudio-dlna. If not, see <http://www.gnu.org/licenses/>.

python ?= python2.7
python ?= python3
user ?= $(shell whoami)

all: pulseaudio_dlna.egg-info

venv:
@echo "venv is deprecated. It is just 'make' now."

pulseaudio_dlna.egg-info: setup.py bin/pip
bin/pip install --editable . && touch $@
bin/pip:

pulseaudio_dlna.egg-info: setup.py bin/pip3
bin/pip3 install --editable . && touch $@
bin/pip3:

virtualenv --system-site-packages -p $(python) .

ifdef DEB_HOST_ARCH
Expand All @@ -45,11 +47,15 @@ release: manpage

manpage: man/pulseaudio-dlna.1


man/pulseaudio-dlna.1: pulseaudio_dlna.egg-info
export USE_PKG_VERSION=1; help2man -n "Stream audio to DLNA devices and Chromecasts" "bin/pulseaudio-dlna" > /tmp/pulseaudio-dlna.1
mv /tmp/pulseaudio-dlna.1 man/pulseaudio-dlna.1
gzip -fk man/pulseaudio-dlna.1


clean:
rm -rf build dist $(shell find pulseaudio_dlna -name "__pycache__")
rm -rf *.egg-info *.egg bin local lib lib64 include share pyvenv.cfg
rm -rf docs htmlcov .coverage .tox pip-selfcheck.json
rm man/pulseaudio-dlna.1.gz
54 changes: 35 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# About #
*Cygn:* This fork takes over masmu/python3 with various fixes and patches, with the help of community, with fedora packaging in mind. Other distributions should work too.
- Avalaible as RPM for Fedora / RH flavours on [COPR](https://copr.fedorainfracloud.org/coprs/cygn/pulseaudio-dlna/)

- *Fedora 34:* You need to switch pipeware back to pulseaudio:

dnf swap --allowerasing pipewire-pulseaudio pulseaudio

- *Fedora 35:* You need to disable wireplumber:

systemctl --user mask wireplumber.service

______________________________________________________________

<img align="left" src="samples/images/application.png">

This is _pulseaudio-dlna_. A lightweight streaming server which brings DLNA / UPNP
Expand Down Expand Up @@ -35,6 +48,11 @@ UPNP renderers in your network will show up as pulseaudio sinks.
If I could help you or if you like my work, you can buy me a [coffee, a beer or pizza](https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=totalexceed%40lancode%2ede&item_name=Donation&no_shipping=2&no_note=1&tax=0&currency_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8).

## Changelog ##
* __python3__ - (_2020-12-25_)

- Pulled some outstanding fixes waiting on masmu's repo
- mfdgroot fixed compatibility with pychromecast 7.5.1
- bumped version to 6.1

* __master__ - (_2017-04-06_)
- Fixed a bug where the detection of DLNA devices failed when there were multiple network interfaces
Expand Down Expand Up @@ -252,23 +270,21 @@ is loaded.
These are the requirements _pulseaudio-dlna_ acutally needs to run. These dependencies
will get installed if you install it via the PPA.

- python2.7
- python-pip
- python-setuptools
- python-dbus
- python-docopt
- python-requests
- python-setproctitle
- python-gi
- python-protobuf
- python-notify2
- python-psutil
- python-concurrent.futures
- python-chardet
- python-netifaces
- python-pyroute2 | python-netaddr
- python-lxml
- python-zeroconf
- python3
- python3-pip
- python3-setuptools
- python3-dbus
- python3-docopt
- python3-requests
- python3-setproctitle
- python3-gi
- python3-notify2
- python3-psutil
- python3-chardet
- python3-netifaces
- python3-pyroute2 | python3-netaddr
- python3-lxml
- python3-pychromecast
- vorbis-tools
- sox
- lame
Expand All @@ -278,7 +294,7 @@ will get installed if you install it via the PPA.

You can install all the dependencies in Ubuntu via:

sudo apt-get install python2.7 python-pip python-setuptools python-dbus python-docopt python-requests python-setproctitle python-gi python-protobuf python-notify2 python-psutil python-concurrent.futures python-chardet python-netifaces python-pyroute2 python-netaddr python-lxml python-zeroconf vorbis-tools sox lame flac faac opus-tools
sudo apt-get install python3 python3-pip python3-setuptools python3-dbus python3-docopt python3-requests python3-setproctitle python3-gi python3-notify2 python3-psutil python3-chardet python3-netifaces python3-pyroute2 python3-netaddr python3-lxml python3-pychromecast vorbis-tools sox lame flac faac opus-tools

### PulseAudio DBus module ###

Expand Down Expand Up @@ -314,7 +330,7 @@ So all Ubuntu versions prior to _14.10 Utopic_ need to install:

All Ubuntu versions above install:

sudo apt-get install virtualenv python-dev
sudo apt-get install virtualenv python3-dev

#### Installing & starting ####

Expand Down
15 changes: 11 additions & 4 deletions man/pulseaudio-dlna.1
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.2.
.TH PULSEAUDIO-DLNA "1" "April 2016" "pulseaudio-dlna 0.5.2" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.14.
.TH PULSEAUDIO-DLNA "1" "janvier 2021" "pulseaudio-dlna 0.6.1" "User Commands"
.SH NAME
pulseaudio-dlna \- Stream audio to DLNA devices and Chromecasts
.SH DESCRIPTION
.SS "Usage:"
.TP
pulseaudio\-dlna pulseaudio\-dlna [\-\-host <host>] [\-\-port <port>][\-\-encoder <encoders> | \fB\-\-codec\fR <codec>] [\-\-bit\-rate=<rate>]
pulseaudio\-dlna [\-\-host <host>] [\-\-port <port>][\-\-encoder <encoders> | \fB\-\-codec\fR <codec>] [\-\-bit\-rate=<rate>]
[\-\-encoder\-backend <encoder\-backend>]
[\-\-filter\-device=<filter\-device>]
[\-\-renderer\-urls <urls>]
[\-\-request\-timeout <timeout>]
[\-\-chunk\-size <chunk\-size>]
[\-\-msearch\-port=<msearch\-port>] [\-\-ssdp\-mx <ssdp\-mx>] [\-\-ssdp\-ttl <ssdp\-ttl>] [\-\-ssdp\-amount <ssdp\-amount>]
[\-\-cover\-mode <mode>]
[\-\-auto\-reconnect]
[\-\-debug]
[\-\-fake\-http10\-content\-length] [\-\-fake\-http\-content\-length]
[\-\-disable\-switchback] [\-\-disable\-ssdp\-listener] [\-\-disable\-device\-stop] [\-\-disable\-workarounds]
[\-\-disable\-switchback] [\-\-disable\-ssdp\-listener] [\-\-disable\-device\-stop] [\-\-disable\-workarounds] [\-\-disable\-mimetype\-check]
.TP
pulseaudio\-dlna [\-\-host <host>] [\-\-create\-device\-config] [\-\-update\-device\-config]
[\-\-msearch\-port=<msearch\-port>] [\-\-ssdp\-mx <ssdp\-mx>] [\-\-ssdp\-ttl <ssdp\-ttl>] [\-\-ssdp\-amount <ssdp\-amount>]
Expand Down Expand Up @@ -94,6 +95,9 @@ Set the renderer urls yourself. no discovery will commence.
\fB\-\-request\-timeout=\fR<timeout>
Set the timeout for requests in seconds [default: 15].
.TP
\fB\-\-chunk\-size=\fR<chunk\-size>
Set the stream's chunk size [default: 4096].
.TP
\fB\-\-ssdp\-ttl=\fR<ssdp\-ttl>
Set the SSDP socket's TTL [default: 10].
.TP
Expand Down Expand Up @@ -143,6 +147,9 @@ If set, the application won't send any stop commands to renderers at all
\fB\-\-disable\-workarounds\fR
If set, the application won't apply any device workarounds
.TP
\fB\-\-disable\-mimetype\-check\fR
If set, the application won't check the device's mime type capabilities
.TP
\fB\-v\fR \fB\-\-version\fR
Show the version.
.TP
Expand Down
Binary file added man/pulseaudio-dlna.1.gz
Binary file not shown.
83 changes: 83 additions & 0 deletions pulseaudio-dlna.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
%global srcname pulseaudio_dlna

Name: pulseaudio-dlna
Version: 0.6.6
Release: 1
Source0: %{name}-%{version}.tar.gz
License: GPLv3
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Massimo Mund <[email protected]>
Url: https://github.com/cygn/pulseaudio-dlna
Packager: Sinan H <[email protected]>
Summary: A small DLNA server which brings DLNA / UPNP support to PulseAudio and Linux.

BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: python3-devel
Requires: python3-gobject
Requires: sox
Requires: vorbis-tools

%description
A small DLNA server which brings DLNA / UPNP support to PulseAudio and Linux.

It can stream your current PulseAudio playback to different UPNP devices (UPNP Media Renderers) in your network. It's main goals are: easy to use, no configuration hassle, no big dependencies.

https://github.com/cygn/pulseaudio-dlna

%pre
rm -rf %{python3_sitelib}/%{srcname}*

%prep
%autosetup -n %{name}-%{version}

%build
%py3_build

%install
%py3_install

%clean
rm -rf $RPM_BUILD_ROOT

# Note that there is no %%files section for the unversioned python module
%files -n %{name}
%doc README.md
%license LICENSE
%{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/%{srcname}/
%{_bindir}/pulseaudio-dlna
%{_mandir}/man1/%{name}.1*

%changelog
* Thu Dec 29 2022 Sinan Haliyo <[email protected]> 0.6.6-1
- fix processing of dict-encapsulated sink mime support response
84c60d800a3cc549b5b829b1c599c22fa7b030f1 @stsichler ([email protected])

* Sat Mar 19 2022 Sinan Haliyo <[email protected]> 0.6.5-1
- requires pychromecast 10 ([email protected])

* Sat Jan 08 2022 Sinan Haliyo <[email protected]> 0.6.4-1
- pychromecast 10 compatiblity ([email protected])
- pychromecast 10 compatible now ([email protected])

* Thu Jan 06 2022 cygn <[email protected]> 0.6.3-6
-

* Mon Dec 27 2021 Sinan Haliyo <[email protected]> 0.6.3-5
-

* Mon Dec 27 2021 Sinan Haliyo <[email protected]> 0.6.3-4
- new release ([email protected])

* Mon Dec 27 2021 Sinan Haliyo <[email protected]> 0.6.3-3
- new package built with tito

* Mon Dec 27 2021 Sinan Haliyo <[email protected]>
- new package built with tito



8 changes: 3 additions & 5 deletions pulseaudio_dlna/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3

# This file is part of pulseaudio-dlna.

Expand All @@ -15,12 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with pulseaudio-dlna. If not, see <http://www.gnu.org/licenses/>.

from __future__ import unicode_literals

import os
import pkg_resources

import utils.git
from .utils import git

try:
version = pkg_resources.get_distribution(__package__).version
Expand All @@ -30,7 +28,7 @@
if os.environ.get('USE_PKG_VERSION', None) == '1':
branch, rev = None, None
else:
branch, rev = utils.git.get_head_version()
branch, rev = git.get_head_version()

__version__ = '{version}{rev}'.format(
version=version,
Expand Down
6 changes: 2 additions & 4 deletions pulseaudio_dlna/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3

# This file is part of pulseaudio-dlna.

Expand Down Expand Up @@ -115,9 +115,6 @@

'''


from __future__ import unicode_literals

import sys
import os
import docopt
Expand Down Expand Up @@ -170,5 +167,6 @@ def acquire_lock():
except socket.error:
return False


if __name__ == "__main__":
sys.exit(main())
14 changes: 5 additions & 9 deletions pulseaudio_dlna/application.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3

# This file is part of pulseaudio-dlna.

Expand All @@ -15,8 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with pulseaudio-dlna. If not, see <http://www.gnu.org/licenses/>.

from __future__ import unicode_literals

import multiprocessing
import signal
import setproctitle
Expand All @@ -33,7 +31,6 @@
import pulseaudio_dlna.plugins.dlna.ssdp.listener
import pulseaudio_dlna.plugins.dlna.ssdp.discover
import pulseaudio_dlna.plugins.chromecast
import pulseaudio_dlna.plugins.chromecast.mdns
import pulseaudio_dlna.encoders
import pulseaudio_dlna.covermodes
import pulseaudio_dlna.streamserver
Expand All @@ -47,7 +44,6 @@

class Application(object):

ENCODING = 'utf-8'
DEVICE_CONFIG_PATHS = [
os.path.expanduser('~/.local/share/pulseaudio-dlna'),
'/etc/pulseaudio-dlna',
Expand Down Expand Up @@ -213,7 +209,7 @@ def run(self, options):
logger.info(' {}'.format(encoder))

logger.info('Codec settings:')
for identifier, _type in pulseaudio_dlna.codecs.CODECS.iteritems():
for identifier, _type in pulseaudio_dlna.codecs.CODECS.items():
codec = _type()
logger.info(' {}'.format(codec))

Expand Down Expand Up @@ -331,9 +327,9 @@ def obj_to_dict(obj):
continue
try:
with open(config_file, 'w') as h:
h.write(json_text.encode(self.ENCODING))
h.write(json_text)
logger.info('Found the following devices:')
for device in holder.devices.values():
for device in list(holder.devices.values()):
logger.info('{name} ({flavour})'.format(
name=device.name, flavour=device.flavour))
for codec in device.codecs:
Expand All @@ -356,7 +352,7 @@ def read_device_config(self):
if os.path.isfile(config_file) and \
os.access(config_file, os.R_OK):
with open(config_file, 'r') as h:
json_text = h.read().decode(self.ENCODING)
json_text = h.read()
logger.debug('Device configuration:\n{}'.format(json_text))
json_text = json_text.replace('\n', '')
try:
Expand Down
Loading