Skip to content

Commit ef8a755

Browse files
authored
Make beet.yaml video field optional (#1225)
* Make video field optional * Remove null video fields * Modify xp storage video link to not link to a playlist * Remove RP null video field * Update docs * Review comments * Review part 2
1 parent e42406f commit ef8a755

File tree

56 files changed

+4
-57
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4
-57
lines changed

docs/making-a-module.md

Lines changed: 1 addition & 1 deletion

gm4/plugins/readme_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ def beet_default(ctx: Context, opts: ManifestConfig):
119119
})
120120

121121
# Modrinth Youtube Video Embed
122-
if (vid_url:=ctx.meta['gm4']['video']) is not None:
123-
embed_url = re.sub(r'https:\/\/www.youtube.com\/watch\?v=(\w+)', r'https://www.youtube.com/embed/\1', vid_url)
122+
if 'video' in ctx.meta['gm4'] and ctx.meta['gm4']['video'] is not None:
123+
embed_url = re.sub(r'https:\/\/www.youtube.com\/watch\?v=(\w+)', r'https://www.youtube.com/embed/\1', ctx.meta['gm4']['video'])
124124

125125
site_replacements["modrinth"].update({
126126
r"(.+)<!-- *\$modrinth:replaceWithVideo[ -]+?>" : (

gm4_animi_shamir/beet.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ meta:
3535
- Modifies items right after a player died, and might fight over those items with other Datapacks that do the same.
3636
modrinth:
3737
project_id: bPnAELDm
38-
video: null
3938
wiki: https://wiki.gm4.co/wiki/Metallurgy/Animi_Shamir
4039
credits:
4140
Creator:

gm4_apple_trees/beet.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ meta:
3434
project_id: Afacz65w
3535
smithed:
3636
pack_id: gm4_apple_trees
37-
video: null
3837
wiki: https://wiki.gm4.co/wiki/Apple_Trees
3938
credits:
4039
Creators:

gm4_audere_shamir/beet.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ meta:
3131
notes: []
3232
modrinth:
3333
project_id: 2rSIqoh7
34-
video: null
3534
wiki: https://wiki.gm4.co/wiki/Metallurgy/Audere_Shamir
3635
credits:
3736
Creator:

gm4_balloon_animals/beet.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ meta:
2323
description: Looking for exotic animals? This module makes some Wandering Traders sell cute baby animals!
2424
modrinth:
2525
project_id: zKRZZHQ3
26-
video: null
2726
wiki: https://wiki.gm4.co/wiki/Balloon_Animals
2827
credits:
2928
Creator:

gm4_blossoming_pots/beet.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ meta:
2929
pack_id: gm4_blossoming_pots
3030
planetminecraft:
3131
uid: 6135276
32-
video: null
3332
wiki: https://wiki.gm4.co/wiki/Blossoming_Pots
3433
credits:
3534
Creator:

gm4_book_binders/beet.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ meta:
4141
notes: []
4242
modrinth:
4343
project_id: oIqNf2N4
44-
video: null
4544
wiki: https://wiki.gm4.co/wiki/Book_Binders
4645
credits:
4746
Creators:

gm4_bookshelf_inspector/beet.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ meta:
2323
project_id: hI6pAf86
2424
smithed:
2525
pack_id: gm4_bookshelf_inspector
26-
video: null
2726
wiki: https://wiki.gm4.co/wiki/Bookshelf_Inspector
2827
credits:
2928
Creator:

gm4_calling_bell/beet.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ meta:
3131
project_id: qNzelyE3
3232
smithed:
3333
pack_id: gm4_calling_bell
34-
video: null
3534
wiki: https://wiki.gm4.co/wiki/Calling_Bell
3635
credits:
3736
Creator:

0 commit comments

Comments
 (0)