srt/sub file detection

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
macardi Offline
Senior Member
Posts: 179
Joined: Sep 2008
Reputation: 0
Location: Sweden
Post: #1
Hi,

I would like to have a flag in the library indicating if subtitles exists for my movies and episodes. So i wonder if it would be possible to somehow detect if a video file has a corresponding subtitle file (srt or sub) for a specific movie/episode?

Marcus
(This post was last modified: 2012-04-11 17:50 by macardi.)
find quote
Hitcher Offline
Skilled Skinner
Posts: 11,077
Joined: Aug 2007
Reputation: 103
Location: Eastleigh, UK
Post: #2
Code:
<visible>substring(ListItem.FilenameAndPath,.srt,Right) | substring(ListItem.FilenameAndPath,.sub,Right)</visible>
find quote
macardi Offline
Senior Member
Posts: 179
Joined: Sep 2008
Reputation: 0
Location: Sweden
Post: #3
Thanks Hitcher for your reply!

It doesn't seems work unfortunately,
"ListItem.FilenameAndPath" returns the file name of the selected video file with the extension (mkv, avi etc.). A present srt or sub file doesn't seems to be detected by this command.
find quote
pecinko Offline
Donor
Posts: 3,838
Joined: Dec 2008
Reputation: 52
Location: Prague / Belgrade
Post: #4
EDIT: Never mind, won't work.

My skins:

Amber
Quartz

(This post was last modified: 2012-04-11 20:03 by pecinko.)
find quote
butchabay Offline
Skilled Skinner
Posts: 3,843
Joined: Mar 2010
Reputation: 75
Location: Planet Crematoria
Post: #5
What if you try ListItem.Filename ?
find quote
ronie Online
Team-Kodi Member
Posts: 9,446
Joined: Jan 2009
Reputation: 165
Post: #6
my vote goes to: not possible.

Always read the Kodi online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Hitcher Offline
Skilled Skinner
Posts: 11,077
Joined: Aug 2007
Reputation: 103
Location: Eastleigh, UK
Post: #7
Yeah, not sure what I was thinking earlier.
find quote
macardi Offline
Senior Member
Posts: 179
Joined: Sep 2008
Reputation: 0
Location: Sweden
Post: #8
Not possible seems to be the final answer then. Thank you for your input.
find quote