From 8b64c5aa67242c12815b8a48d4fe0da3a5b423c6 Mon Sep 17 00:00:00 2001 From: Gr4ffy Date: Tue, 6 Feb 2024 09:16:45 +0100 Subject: [PATCH 1/7] Update __init__.py --- mopidy_defaultplaylist/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mopidy_defaultplaylist/__init__.py b/mopidy_defaultplaylist/__init__.py index 63a1fa9..bbddd62 100644 --- a/mopidy_defaultplaylist/__init__.py +++ b/mopidy_defaultplaylist/__init__.py @@ -25,6 +25,7 @@ def get_config_schema(self): schema["defaultplaylist_name"] = config.String() schema["autoplay"] = config.Boolean() schema["shuffle"] = config.Boolean() + schema["repeat"] = config.Boolean() return schema From b2e090b6b7bc7c39f2908eaa0ef2c9a373f0efe4 Mon Sep 17 00:00:00 2001 From: Gr4ffy Date: Tue, 6 Feb 2024 09:17:29 +0100 Subject: [PATCH 2/7] Update ext.conf --- mopidy_defaultplaylist/ext.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/mopidy_defaultplaylist/ext.conf b/mopidy_defaultplaylist/ext.conf index f8cf13b..899107b 100644 --- a/mopidy_defaultplaylist/ext.conf +++ b/mopidy_defaultplaylist/ext.conf @@ -3,3 +3,4 @@ enabled = true defaultplaylist_name = Valerie autoplay = true shuffle = true +repeat = true From 6a59700200774f716008c76dcf59eee307dbe5c7 Mon Sep 17 00:00:00 2001 From: Gr4ffy Date: Tue, 6 Feb 2024 09:38:01 +0100 Subject: [PATCH 3/7] Update frontend.py --- mopidy_defaultplaylist/frontend.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mopidy_defaultplaylist/frontend.py b/mopidy_defaultplaylist/frontend.py index 2b88a1d..ea680d9 100755 --- a/mopidy_defaultplaylist/frontend.py +++ b/mopidy_defaultplaylist/frontend.py @@ -14,6 +14,7 @@ def __init__(self, config, core): self.defaultplaylist_name = self.config["defaultplaylist_name"] self.autoplay = self.config["autoplay"] self.shuffle = self.config["shuffle"] + self.repeat = self.config["repeat"] # Your frontend implementation def on_start(self): @@ -30,17 +31,18 @@ def on_start(self): logger.info("Tracks: {0}".format(track_uris)) self.core.tracklist.add(uris=track_uris) self.core.tracklist.set_random(self.shuffle) + self.core.tracklist.set_repeat(self.repeat) if self.autoplay: logger.info( "Loaded Playlist {}, autoplay on --> start playing tracklist, shuffle-mode {}".format( - self.defaultplaylist_name, self.shuffle + self.defaultplaylist_name, self.shuffle, self.repeat, ) ) self.core.playback.play() else: logger.info( "Loaded Playlist {}, shuffle-mode {}".format( - self.defaultplaylist_name, self.shuffle + self.defaultplaylist_name, self.shuffle, self.repeat, ) ) else: From f29a3ce34416e8ea1c1b8384c0a7a47fca12b340 Mon Sep 17 00:00:00 2001 From: Gr4ffy Date: Tue, 6 Feb 2024 09:45:01 +0100 Subject: [PATCH 4/7] Update setup.cfg --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c055e7c..995244e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = Mopidy-DefaultPlaylist -version = 0.1.0 +version = 0.1.1 url = https://github.com/michaelmeer/mopidy-defaultplaylist author = Michael Meer author_email = michael.meer@gmail.com From 2d12159f93707163f946ffd188a52a206b4f5c47 Mon Sep 17 00:00:00 2001 From: Gr4ffy Date: Tue, 6 Feb 2024 09:57:13 +0100 Subject: [PATCH 5/7] Update frontend.py --- mopidy_defaultplaylist/frontend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy_defaultplaylist/frontend.py b/mopidy_defaultplaylist/frontend.py index ea680d9..db5df91 100755 --- a/mopidy_defaultplaylist/frontend.py +++ b/mopidy_defaultplaylist/frontend.py @@ -34,14 +34,14 @@ def on_start(self): self.core.tracklist.set_repeat(self.repeat) if self.autoplay: logger.info( - "Loaded Playlist {}, autoplay on --> start playing tracklist, shuffle-mode {}".format( + "Loaded Playlist {}, autoplay on --> start playing tracklist, shuffle-mode {}, repeat-mode {}".format( self.defaultplaylist_name, self.shuffle, self.repeat, ) ) self.core.playback.play() else: logger.info( - "Loaded Playlist {}, shuffle-mode {}".format( + "Loaded Playlist {}, shuffle-mode {}, repeat-mode {}".format( self.defaultplaylist_name, self.shuffle, self.repeat, ) ) From 028aa90cc8902d2bd7817e4412e48832b5899167 Mon Sep 17 00:00:00 2001 From: Gr4ffy Date: Tue, 6 Feb 2024 09:58:36 +0100 Subject: [PATCH 6/7] Update README.rst --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2849ecf..4ad0475 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ Mopidy-DefaultPlaylist :target: https://codecov.io/gh/michaelmeer/mopidy-defaultplaylist :alt: Test coverage -Sets a default playlist for Mopidy, and allows to start playing it automatically after start of the Mopidy service. Optionally allows to set shuffle mode on. This can be useful for projects like the `Pimoroni Pirate Radio `_. +Sets a default playlist for Mopidy, and allows to start playing it automatically after start of the Mopidy service. Optionally allows to set shuffle and repeat mode on. This can be useful for projects like the `Pimoroni Pirate Radio `_. Installation @@ -38,6 +38,7 @@ Mopidy-DefaultPlaylist to your Mopidy configuration file:: defaultplaylist_name = Top Hits autoplay = true shuffle = true + repeat = true The default From f3b2ac6995cffdf4346e5d40e67f4b1c6bca8696 Mon Sep 17 00:00:00 2001 From: Gr4ffy Date: Tue, 6 Feb 2024 10:01:17 +0100 Subject: [PATCH 7/7] Update CHANGELOG.rst --- CHANGELOG.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e609420..feb4775 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,12 @@ Changelog ********* +v0.1.1 +======================================== + +- Repeat mode added. + + v0.1.0 (UNRELEASED) ========================================