diff --git a/app/Http/Controllers/DownloadController.php b/app/Http/Controllers/DownloadController.php index 1674d6c7..29ff30cb 100644 --- a/app/Http/Controllers/DownloadController.php +++ b/app/Http/Controllers/DownloadController.php @@ -40,14 +40,18 @@ public function downloadFile(Request $request, $filename) public function downloadLilyponds(Request $request) { $updated_after = $request->get('updated_after'); - $result = DB::table('song_lyrics') + $query = DB::table('song_lyrics') ->select('song_lyrics.id', 'rendered_scores.filename') ->join('lilypond_parts_sheet_music', 'song_lyrics.id', '=', 'lilypond_parts_sheet_music.song_lyric_id') ->join('rendered_scores', 'lilypond_parts_sheet_music.id', '=', 'rendered_scores.lilypond_parts_sheet_music_id') - ->where('song_lyrics.updated_at', '>', $updated_after) ->where('rendered_scores.filetype', 'svg') - ->where('render_config_hash', '491ed726') // {"hide_voices": ["muzi", "tenor", "bas", "zeny", "sopran", "alt"]} - ->get(); + ->where('render_config_hash', '491ed726'); // {"hide_voices": ["muzi", "tenor", "bas", "zeny", "sopran", "alt"]} + + if (isset($updated_after)) { + $query = $query->where('song_lyrics.updated_at', '>', $updated_after); + } + + $result = $query->get(); $response = new StreamedResponse(function () use ($result) { $zip = new ZipStream( diff --git a/resources/assets/js/admin/pages/edit/SongLyricEdit.vue b/resources/assets/js/admin/pages/edit/SongLyricEdit.vue index f2872c15..a4f408c5 100644 --- a/resources/assets/js/admin/pages/edit/SongLyricEdit.vue +++ b/resources/assets/js/admin/pages/edit/SongLyricEdit.vue @@ -472,7 +472,7 @@ name="input-7-4" label="Notový zápis ve formátu Lilypond" ref="textarea" - :readonly="true" + :readonly="model.lilypond.length === 0" v-model="model.lilypond" placeholder="Pro vytváření nových LilyPond záznamů použijte nový způsob zápisu" style="font-family: monospace; tab-size: 2; margin-bottom: 5px;"