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

Add script to create dummy media files #1432

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

JonnyWong16
Copy link
Collaborator

Description

Adds tools/plex-dummyfiles.py to create dummy files for testing with the proper Plex folder and file naming structure.

Examples

Movies

References:

Separators for --versions argument:

  • | = Movie part separator
> python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Blade Runner" --year 1982
D:\Movies\
├─ Blade Runner (1982)\
│  ├─ Blade Runner (1982).mp4

> python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Batman Begins" --year 2005 --tmdb 272
D:\Movies\
├─ Batman Begins (2005) {tmdb-272}\
│  ├─ Batman Begins (2005) {tmdb-272}.mp4

> python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Blade Runner" --year 1982 --edition "Director's Cut"
D:\Movies\
├─ Blade Runner (1982) {edition-Director's Cut}\
│  ├─ Blade Runner (1982) {edition-Director's Cut}.mp4

> python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "The Dark Knight" --year 2008 --versions "|2"
D:\Movies\
├─ The Dark Knight (2008)\
│  ├─ The Dark Knight (2008) - pt1.mp4
│  ├─ The Dark Knight (2008) - pt2.mp4

> python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Pulp Fiction" --year 1994 --versions "1080p|2" --versions "SD"
D:\Movies\
├─ Pulp Fiction (1994)\
│  ├─ Pulp Fiction (1994) - 1080p - pt1.mp4
│  ├─ Pulp Fiction (1994) - 1080p - pt2.mp4
│  ├─ Pulp Fiction (1994) - SD.mp4

> python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Blade Runner" --year 1982 --edition "Director's Cut" --versions "1080p.h264" --versions "1080p.hvec" --versions "4k.h264" --versions "4k.hevc"
D:\Movies\
├─ Blade Runner (1982) {edition-Director's Cut}\
│  ├─ Blade Runner (1982) - 1080p.h264 {edition-Director's Cut}.mp4
│  ├─ Blade Runner (1982) - 1080p.hvec {edition-Director's Cut}.mp4
│  ├─ Blade Runner (1982) - 4k.h264 {edition-Director's Cut}.mp4
│  ├─ Blade Runner (1982) - 4k.hevc {edition-Director's Cut}.mp4

TV Shows

References:

Separators for --seasons and --episodes arguments:

  • , = Season/episode list separator
  • - = Season/episode range separator
  • + = Episode stack separator
  • | = Episode part separator
> python tools/plex-dummyfiles.py show --root "D:\TV Shows" --title "The Office (US)" --year 2005 --tvdb 73244 --seasons 1 --episodes "1-3,6-8"
D:\TV Shows\
├─ The Office (US) (2005) {tvdb-73244}\
│  ├─ Season 01\
│  │  ├─ The Office (US) (2005) - S01E01.mp4
│  │  ├─ The Office (US) (2005) - S01E02.mp4
│  │  ├─ The Office (US) (2005) - S01E03.mp4
│  │  ├─ The Office (US) (2005) - S01E06.mp4
│  │  ├─ The Office (US) (2005) - S01E07.mp4
│  │  ├─ The Office (US) (2005) - S01E08.mp4

> python tools/plex-dummyfiles.py show --root "D:\TV Shows" --title "Doctor Who" --year 1963 --seasons "1-3" --episodes "1-3"
D:\TV Shows\
├─ Doctor Who (1963)\
│  ├─ Season 01\
│  │  ├─ Doctor Who (1963) - S01E01.mp4
│  │  ├─ Doctor Who (1963) - S01E02.mp4
│  │  ├─ Doctor Who (1963) - S01E03.mp4
│  ├─ Season 02\
│  │  ├─ Doctor Who (1963) - S02E01.mp4
│  │  ├─ Doctor Who (1963) - S02E02.mp4
│  │  ├─ Doctor Who (1963) - S02E03.mp4
│  ├─ Season 03\
│  │  ├─ Doctor Who (1963) - S03E01.mp4
│  │  ├─ Doctor Who (1963) - S03E02.mp4
│  │  ├─ Doctor Who (1963) - S03E03.mp4

> python tools/plex-dummyfiles.py show --root "D:\TV Shows" --title "Grey's Anatomy" --year 2005 --seasons 0 --episodes 1 --seasons 1 --episodes "1|2,2-3" --seasons 2 --episodes "1+3,4"
D:\TV Shows\
├─ Grey's Anatomy (2005)\
│  ├─ Season 00\
│  │  ├─ Grey's Anatomy (2005) - S00E01.mp4        
│  ├─ Season 01\
│  │  ├─ Grey's Anatomy (2005) - S01E01 - pt1.mp4  
│  │  ├─ Grey's Anatomy (2005) - S01E01 - pt2.mp4  
│  │  ├─ Grey's Anatomy (2005) - S01E02.mp4        
│  │  ├─ Grey's Anatomy (2005) - S01E03.mp4        
│  ├─ Season 02\
│  │  ├─ Grey's Anatomy (2005) - S02E01-E03.mp4    
│  │  ├─ Grey's Anatomy (2005) - S02E04.mp4 

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods
  • I have added tests when applicable

@JonnyWong16 JonnyWong16 merged commit ffbbf59 into pkkid:master Jun 22, 2024
5 checks passed
@JonnyWong16 JonnyWong16 deleted the feature/plex-dummyfiles branch June 22, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant