WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Create / Add to Video Playlist (Read 3234 times)
RJG
YaBB Newbies
*
Offline



Posts: 15
Create / Add to Video Playlist
Aug 18th, 2013 at 5:03pm
 
Not sure where my original thread went so I figured I would start another.

what I'm looking to do is to create a video playlist that the Western Digital Live media player can read.

It appears that it can read a .m2u file with entries like below.

Code:
..\TBBT\08-11-2013\TheBigBangTheory-S01E15-ThePorkChopIndeterminacy-20959191-0-cln.ts
..\TBBT\08-11-2013\TheBigBangTheory-S01E16-ThePeanutReaction-20959192-0-cln.ts
..\Wipeout\08-15-2013\Wipeout-S06E12-BeautyQueens-20768670-0-cln.ts 



How can I have WD create the file if the file does not exist, and then add a new entry to this file. (I guess with the newest items at the top.)

Thanks
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Create / Add to Video Playlist
Reply #1 - Aug 19th, 2013 at 7:23am
 
Hi,

The forum had a problem a few days ago and some threads were lost.

What you can try is use the "run a .bat file" task to monitor for new ts files and let it start the following .bat file
Code:
SET M2U=C:\My Files\playlist.m2u
ECHO %WD_FILE% >> "%M2U%"
 



This will append the filenames to the m2u file.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
RJG
YaBB Newbies
*
Offline



Posts: 15
Re: Create / Add to Video Playlist
Reply #2 - Aug 22nd, 2013 at 1:54am
 
Gert wrote on Aug 19th, 2013 at 7:23am:
Hi,

The forum had a problem a few days ago and some threads were lost.

What you can try is use the "run a .bat file" task to monitor for new ts files and let it start the following .bat file
Code:
SET M2U=C:\My Files\playlist.m2u
ECHO %WD_FILE% >> "%M2U%"
 



This will append the filenames to the m2u file.


Thank you so much Gert, that worked perfectly with 2 exceptions.

1) the .m3u entries must be in this format

Here is the string where the file is being copied to:

\\SERVER\Videos\TV Shows\1 RECORDINGS\Longmire\08-19-2013\Longmire-S02E12-AGoodDeathIsHardtoFind-21050089-0
-cln.ts


Here is what the string must look like inside the .m3u playlist:

..\Longmire\08-19-2013\Longmire-S02E12-AGoodDeathIsHardtoFind-21050089-0-cln.ts

2) Is there a way to have the new entries at the beginning of the playlist?


As always, thanks for all your help.

Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Create / Add to Video Playlist
Reply #3 - Aug 22nd, 2013 at 7:33am
 
This version fixes the filename (maybe the "37" is one off, and you need to add or subtract 1 for it to work properly)
[code]
SET M2U=C:\My Files\playlist.m2u
rem only use the filename starting from position 37 and prefix with ..
SET LI=..%WD_FILE:~37%
ECHO %LI% >> "%M2U%"
[/code]

Inserting a line as the FIRST line is possible, but will be slow if the file grows bigger. Let me know if you REALLY want that,
Here is an alternative that may be good enough for your needs. It creates a NEW m2u file named after the current date (yyyymmdd),
[code]
SET M2U=C:\My Files\playlist_%WD_DATE%.m2u
rem only use the filename starting from position 37 and prefix with ..
SET LI=..%WD_FILE:~37%
ECHO %LI% >> "%M2U%"
[/code]
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
RJG
YaBB Newbies
*
Offline



Posts: 15
Re: Create / Add to Video Playlist
Reply #4 - Aug 23rd, 2013 at 4:03am
 
[quote author=Gert link=1376838190/0#3 date=1377149602]This version fixes the filename (maybe the "37" is one off, and you need to add or subtract 1 for it to work properly)
[code]
SET M2U=C:\My Files\playlist.m2u
rem only use the filename starting from position 37 and prefix with ..
SET LI=..%WD_FILE:~37%
ECHO %LI% >> "%M2U%"
[/code]

Inserting a line as the FIRST line is possible, but will be slow if the file grows bigger. Let me know if you REALLY want that,
Here is an alternative that may be good enough for your needs. It creates a NEW m2u file named after the current date (yyyymmdd),
[code]
SET M2U=C:\My Files\playlist_%WD_DATE%.m2u
rem only use the filename starting from position 37 and prefix with ..
SET LI=..%WD_FILE:~37%
ECHO %LI% >> "%M2U%"
[/code]
[/quote]

Gert; you're amazing. Worked perfectly.

Once again, THANK YOU!


Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1