forked from rc/aircox
		
	status_verbose
This commit is contained in:
		@ -59,6 +59,10 @@ class BaseMetadata:
 | 
				
			|||||||
    def is_playing(self):
 | 
					    def is_playing(self):
 | 
				
			||||||
        return self.status == 'playing'
 | 
					        return self.status == 'playing'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @property
 | 
				
			||||||
 | 
					    def status_verbose(self):
 | 
				
			||||||
 | 
					        return self.validate_status(self.status, True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def fetch(self):
 | 
					    def fetch(self):
 | 
				
			||||||
        data = self.controller.send('request.metadata ', self.rid, parse=True)
 | 
					        data = self.controller.send('request.metadata ', self.rid, parse=True)
 | 
				
			||||||
        if data:
 | 
					        if data:
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,7 @@ msgid ""
 | 
				
			|||||||
msgstr ""
 | 
					msgstr ""
 | 
				
			||||||
"Project-Id-Version: PACKAGE VERSION\n"
 | 
					"Project-Id-Version: PACKAGE VERSION\n"
 | 
				
			||||||
"Report-Msgid-Bugs-To: \n"
 | 
					"Report-Msgid-Bugs-To: \n"
 | 
				
			||||||
"POT-Creation-Date: 2020-05-30 13:53+0000\n"
 | 
					"POT-Creation-Date: 2020-05-31 18:34+0000\n"
 | 
				
			||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
					"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 | 
				
			||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
					"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 | 
				
			||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
					"Language-Team: LANGUAGE <LL@li.org>\n"
 | 
				
			||||||
@ -18,79 +18,91 @@ msgstr ""
 | 
				
			|||||||
"Content-Transfer-Encoding: 8bit\n"
 | 
					"Content-Transfer-Encoding: 8bit\n"
 | 
				
			||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
 | 
					"Plural-Forms: nplurals=2; plural=(n > 1);\n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:18
 | 
					#: controllers.py:75
 | 
				
			||||||
 | 
					msgid "playing"
 | 
				
			||||||
 | 
					msgstr "en cours de lecture"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#: controllers.py:77
 | 
				
			||||||
 | 
					msgid "paused"
 | 
				
			||||||
 | 
					msgstr "pause"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#: controllers.py:79
 | 
				
			||||||
 | 
					msgid "stopped"
 | 
				
			||||||
 | 
					msgstr "arrêt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#: templates/aircox_streamer/source_item.html:18
 | 
				
			||||||
msgid "Edit related program"
 | 
					msgid "Edit related program"
 | 
				
			||||||
msgstr "Éditer le programme correspondant"
 | 
					msgstr "Éditer le programme correspondant"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:27
 | 
					#: templates/aircox_streamer/source_item.html:27
 | 
				
			||||||
msgid "Synchronize source with Liquidsoap"
 | 
					msgid "Synchronize source with Liquidsoap"
 | 
				
			||||||
msgstr "Synchroniser la source avec Liquidsoap"
 | 
					msgstr "Synchroniser la source avec Liquidsoap"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:31
 | 
					#: templates/aircox_streamer/source_item.html:31
 | 
				
			||||||
msgid "Synchronise"
 | 
					msgid "Synchronise"
 | 
				
			||||||
msgstr "Synchroniser"
 | 
					msgstr "Synchroniser"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:34
 | 
					#: templates/aircox_streamer/source_item.html:34
 | 
				
			||||||
msgid "Restart current track"
 | 
					msgid "Restart current track"
 | 
				
			||||||
msgstr "Rejouer le morceau en cours"
 | 
					msgstr "Rejouer le morceau en cours"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:38
 | 
					#: templates/aircox_streamer/source_item.html:38
 | 
				
			||||||
msgid "Restart"
 | 
					msgid "Restart"
 | 
				
			||||||
msgstr "Rejouer"
 | 
					msgstr "Rejouer"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:41
 | 
					#: templates/aircox_streamer/source_item.html:41
 | 
				
			||||||
msgid "Skip current file"
 | 
					msgid "Skip current file"
 | 
				
			||||||
msgstr "Passer le fichier actuel"
 | 
					msgstr "Passer le fichier actuel"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:42
 | 
					#: templates/aircox_streamer/source_item.html:42
 | 
				
			||||||
msgid "Skip"
 | 
					msgid "Skip"
 | 
				
			||||||
msgstr "Passer"
 | 
					msgstr "Passer"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:51
 | 
					#: templates/aircox_streamer/source_item.html:51
 | 
				
			||||||
msgid "Add sound"
 | 
					msgid "Add sound"
 | 
				
			||||||
msgstr "Ajouter un son"
 | 
					msgstr "Ajouter un son"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:59
 | 
					#: templates/aircox_streamer/source_item.html:59
 | 
				
			||||||
msgid "Select a sound"
 | 
					msgid "Select a sound"
 | 
				
			||||||
msgstr "Sélectionner un son"
 | 
					msgstr "Sélectionner un son"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:61
 | 
					#: templates/aircox_streamer/source_item.html:61
 | 
				
			||||||
msgid "Add a sound to the queue (queue may start playing)"
 | 
					msgid "Add a sound to the queue (queue may start playing)"
 | 
				
			||||||
msgstr "Ajouter un son à la file de lecture (la file de lecture peut démarer)"
 | 
					msgstr "Ajouter un son à la file de lecture (la file de lecture peut démarer)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:70
 | 
					#: templates/aircox_streamer/source_item.html:70
 | 
				
			||||||
msgid "Add"
 | 
					msgid "Add"
 | 
				
			||||||
msgstr "Ajouter"
 | 
					msgstr "Ajouter"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:76
 | 
					#: templates/aircox_streamer/source_item.html:76
 | 
				
			||||||
msgid "Sounds in queue"
 | 
					msgid "Sounds in queue"
 | 
				
			||||||
msgstr "Sons dans la file de lecture"
 | 
					msgstr "Sons dans la file de lecture"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:94
 | 
					#: templates/aircox_streamer/source_item.html:94
 | 
				
			||||||
msgid "Status"
 | 
					msgid "Status"
 | 
				
			||||||
msgstr "Statut"
 | 
					msgstr "Statut"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:104
 | 
					#: templates/aircox_streamer/source_item.html:104
 | 
				
			||||||
msgid "Air time"
 | 
					msgid "Air time"
 | 
				
			||||||
msgstr "En antenne depuis"
 | 
					msgstr "En antenne depuis"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:114
 | 
					#: templates/aircox_streamer/source_item.html:114
 | 
				
			||||||
msgid "Time left"
 | 
					msgid "Time left"
 | 
				
			||||||
msgstr "Temps restant"
 | 
					msgstr "Temps restant"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/source_item.html:122
 | 
					#: templates/aircox_streamer/source_item.html:122
 | 
				
			||||||
msgid "Data source"
 | 
					msgid "Data source"
 | 
				
			||||||
msgstr "Source de donnée"
 | 
					msgstr "Source de donnée"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/streamer.html:19
 | 
					#: templates/aircox_streamer/streamer.html:19
 | 
				
			||||||
msgid "Reload"
 | 
					msgid "Reload"
 | 
				
			||||||
msgstr "Recharger"
 | 
					msgstr "Recharger"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/streamer.html:26
 | 
					#: templates/aircox_streamer/streamer.html:26
 | 
				
			||||||
#: aircox_streamer/templates/aircox_streamer/streamer.html:27
 | 
					#: templates/aircox_streamer/streamer.html:27
 | 
				
			||||||
msgid "Select a station"
 | 
					msgid "Select a station"
 | 
				
			||||||
msgstr "Sélectionner une station"
 | 
					msgstr "Sélectionner une station"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: aircox_streamer/urls.py:9 aircox_streamer/views.py:9
 | 
					#: urls.py:9 views.py:9
 | 
				
			||||||
msgid "Streamer Monitor"
 | 
					msgid "Streamer Monitor"
 | 
				
			||||||
msgstr "Moniteur de stream"
 | 
					msgstr "Moniteur de stream"
 | 
				
			||||||
 | 
				
			|||||||
@ -38,12 +38,16 @@ class SourceSerializer(BaseMetadataSerializer):
 | 
				
			|||||||
    rid = serializers.IntegerField()
 | 
					    rid = serializers.IntegerField()
 | 
				
			||||||
    air_time = serializers.DateTimeField()
 | 
					    air_time = serializers.DateTimeField()
 | 
				
			||||||
    status = serializers.CharField()
 | 
					    status = serializers.CharField()
 | 
				
			||||||
 | 
					    status_verbose = serializers.CharField()
 | 
				
			||||||
    remaining = serializers.FloatField()
 | 
					    remaining = serializers.FloatField()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_url(self, obj, **kwargs):
 | 
					    def get_url(self, obj, **kwargs):
 | 
				
			||||||
        kwargs['station_pk'] = obj.station.pk
 | 
					        kwargs['station_pk'] = obj.station.pk
 | 
				
			||||||
        return super().get_url(obj, **kwargs)
 | 
					        return super().get_url(obj, **kwargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def get_status_verbose(self, obj, **kwargs):
 | 
				
			||||||
 | 
					        return obj.status_verbose
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PlaylistSerializer(SourceSerializer):
 | 
					class PlaylistSerializer(SourceSerializer):
 | 
				
			||||||
    program = serializers.CharField(source='program.id')
 | 
					    program = serializers.CharField(source='program.id')
 | 
				
			||||||
 | 
				
			|||||||
@ -95,7 +95,7 @@
 | 
				
			|||||||
                    <td :class="{'has-text-danger': source.isPlaying, 'has-text-warning': source.isPaused}">
 | 
					                    <td :class="{'has-text-danger': source.isPlaying, 'has-text-warning': source.isPaused}">
 | 
				
			||||||
                        <span v-if="source.isPlaying" class="fas fa-play"></span>
 | 
					                        <span v-if="source.isPlaying" class="fas fa-play"></span>
 | 
				
			||||||
                        <span v-else-if="source.data.status" class="fas fa-pause"></span>
 | 
					                        <span v-else-if="source.data.status" class="fas fa-pause"></span>
 | 
				
			||||||
                        [[ source.data.status || "—" ]]
 | 
					                        [[ source.data.status_verbose || "—" ]]
 | 
				
			||||||
                    </td>
 | 
					                    </td>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
                <tr v-if="source.data.air_time">
 | 
					                <tr v-if="source.data.air_time">
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user