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

If media has no season try to extract it from title for folder structure #747

Merged
merged 3 commits into from
Nov 3, 2023

Conversation

phunkyfish
Copy link
Member

@phunkyfish phunkyfish commented Apr 26, 2023

v20.12.0

  • Extract season from media title for path if not available
  • Set default to include media Group name in path if no dir present

@berkhornet
Copy link

@phunkyfish Hi. Have you been able to resolve this error? I would still like to test if possible. Many thanks.

@phunkyfish
Copy link
Member Author

phunkyfish commented Oct 25, 2023

So the reason I couldn't test this feature was a bug in the media meta data which is now fixed.

There is a bit of work needed for this to work properly so will take a look in the next week or two.

@berkhornet
Copy link

berkhornet commented Oct 26, 2023 via email

@phunkyfish
Copy link
Member Author

@berkhornet
Copy link

@phunkyfish
Thanks for this release. I have tested using Windows 64 bit OS with Kodi 20.2.

I tested by selecting two groups named "KODI MOVIES" and "S: Mystery". "KODI MOVIES" contained five Indiana Jones movies; "S: Mystery" contained 38 tv shows with varying numbers of seasons and episodes.

My first test had the setting "Use M3U Group Name In Path" set to "Always". The five movies were grouped under "KODI MOVIES" but none of the TV shows were listed.

My second test had the setting "Use M3U Group Name In Path" set to "When no media-dir is present". As above, the five movies were grouped under "KODI MOVIES" but none of the TV shows were listed.

My third test had the setting "Use M3U Group Name In Path" set to "Never". This time the TV shows were shown and correctly grouped. However, the five movies were not grouped under "KODI MOVIES" but listed separately.

So the grouping by extracting season from media title works, but other automatic grouping doesn't. I guess one way round this would be to have Movies and TV shows in separate instances of the addon if this couldn't be resolved any other way.

Many thanks for progressing this feature

@phunkyfish
Copy link
Member Author

@phunkyfish Thanks for this release. I have tested using Windows 64 bit OS with Kodi 20.2.

I tested by selecting two groups named "KODI MOVIES" and "S: Mystery". "KODI MOVIES" contained five Indiana Jones movies; "S: Mystery" contained 38 tv shows with varying numbers of seasons and episodes.

My first test had the setting "Use M3U Group Name In Path" set to "Always". The five movies were grouped under "KODI MOVIES" but none of the TV shows were listed.

My second test had the setting "Use M3U Group Name In Path" set to "When no media-dir is present". As above, the five movies were grouped under "KODI MOVIES" but none of the TV shows were listed.

My third test had the setting "Use M3U Group Name In Path" set to "Never". This time the TV shows were shown and correctly grouped. However, the five movies were not grouped under "KODI MOVIES" but listed separately.

So the grouping by extracting season from media title works, but other automatic grouping doesn't. I guess one way round this would be to have Movies and TV shows in separate instances of the addon if this couldn't be resolved any other way.

Many thanks for progressing this feature

Can you provide a test M3U and clearly explain what the output you would like is? This PR us just to try and get the season grouping working.

The detail you provide on what you expect to see is important as it will allow me to figure out what is working and what is it,

@berkhornet
Copy link

Of course, let me pull together a sample file. I will get back to you.

@berkhornet
Copy link

berkhornet commented Oct 27, 2023

@phunkyfish please find attached a test m3u file and a text file detailing the expected output. Many thanks.

I had to give the m3u file the extension .txt to allow upload.

testm3u.txt

Expected Folder Structure.txt

@phunkyfish
Copy link
Member Author

As an example I have these settings enabled:
Screenshot 2023-10-27 at 11 04 47

And a test M3U file:

#EXTM3U tvg-shift="" x-tvg-url="" x-tvg-id="" catchup-correction=""
#EXTINF:-1 tvg-chno="0.41208738342032303" tvg-id="302e343132303837@PseudoTV_Live" tvg-name="Ace Ventura: When Nature Calls " tvg-logo="image://nfs%3a%2f%2f192.168.0.51%2fMovies%2fAce%20Ventura%20When%20Nature%20Calls%20(1995)%2flandscape.jpg/" group-title="Watch Later (PseudoTV Live)" radio="False" catchup="vod" favorite="False" realtime="False" media="True" media-size="0" ,Ace Ventura: When Nature Calls S03E12 dfgdfg
plugin://plugin.video.pseudotv.live/?mode=vod&name=Ace%20Ventura%3A%20When%20Nature%20Calls&id=bmZzOi8vMTkyLjE2OC4wLjUxL01vdmllcy9BY2UgVmVudHVyYSBXaGVuIE5hdHVyZSBDYWxscyAoMTk5NSkvQWNlIFZlbnR1cmEgV2hlbiBOYXR1cmUgQ2FsbHMgKDE5OTUpIC0gQmx1cmF5LTU3NnAgQUFDLm1rdg%3D%3D&channel=383030312e526563656e746c79204164%40PseudoTV_Live&radio=False.pvr
#EXTINF:-1 tvg-chno="0.41208738342032304" tvg-id="302e343132303838@PseudoTV_Live" tvg-name="Ace Ventura: When Nature Calls 2" tvg-logo="image://nfs%3a%2f%2f192.168.0.51%2fMovies%2fAce%20Ventura%20When%20Nature%20Calls%20(1995)%2flandscape.jpg/" group-title="Watch Later (PseudoTV Live)" radio="False" catchup="vod" favorite="False" realtime="False" media="True" media-size="0" ,Ace Ventura: When Nature Calls S03E13 dfgdfg
plugin://plugin.video.pseudotv.live/?mode=vod&name=Ace%20Ventura%3A%20When%20Nature%20Calls&id=bmZzOi8vMTkyLjE2OC4wLjUxL01vdmllcy9BY2UgVmVudHVyYSBXaGVuIE5hdHVyZSBDYWxscyAoMTk5NSkvQWNlIFZlbnR1cmEgV2hlbiBOYXR1cmUgQ2FsbHMgKDE5OTUpIC0gQmx1cmF5LTU3NnAgQUFDLm1rdg%3D%3D&channel=383030312e526563656e746c79204164%40PseudoTV_Live&radio=False.pvr

The path to the two files show in kodi is: Watch Later (PseudoTV Live)/Ace Ventura: When Nature Calls dfgdfg/S03 which I believe is correct.

Looking at your files now.

@phunkyfish
Copy link
Member Author

Ok, I can reproduce what you see with your data. For some reason Use M3U Group Name In Path breaks TV shows. Strange thing is it still knows how many files are in that folder, but it just doesn't display any of them.

In my simple example it works. I wonder if it's something related to forcing M3U entries as media.

@phunkyfish
Copy link
Member Author

Confirmed it's nothing to do with forcing the M3U Entries as media. I added Media="True" to each line in the file you sent me. Same output:
Screenshot 2023-10-27 at 12 14 05
Screenshot 2023-10-27 at 12 14 15

@berkhornet
Copy link

berkhornet commented Oct 27, 2023 via email

@phunkyfish phunkyfish merged commit 27f9391 into kodi-pvr:Nexus Nov 3, 2023
2 of 7 checks passed
@phunkyfish phunkyfish deleted the media-extract-season-episode branch November 3, 2023 20:26
@phunkyfish
Copy link
Member Author

Ok, this was a bug in Kodi itself. Should be a fix out in the next couple of days. On Nexus you will need to use a nightly build as I don't know when/if there will be another point release.

@berkhornet
Copy link

Many thanks. All working fine. A great feature.

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.

2 participants